Hi Eduan,
Thanks for that. Yep that does work for simple web apps, single html pages that can be changed to php files, or applications that serve through a single php page, however…
In the case of DokuWiki if I add that include code then somewhere downtrack a function is called twice:
Fatal error: Cannot redeclare is_ssl() (previously declared in /home/ima21534/public_html/wp-includes/functions.php:3699) in /home/ima21534/public_html/dokuwiki/inc/init.php on line 478
I’m not sure I can debug that, nor what the consequences might be for dokuwiki or other standalone web-apps
In the case of Tumult Hype documents it is feasible, requiring the addition of code to the Hype template. Similarly so for Hot Potatoes. However this is hugely tedious as these files could be contributed by dozens of teacher authors. There may be literally thousands of Hot Potatoes html sub-files making up an application, and typically any of these html files could be the entry point to the application.
So I would need to retrofit hundreds perhaps thousands of files, and again if they are modified by the contributing authors.
It would be far simpler to just protect the directory than modify the contained files.
Previously I worked with Moodle 1.9, and this allowed me to set up access to sub-directories’ contents according to valid enrolments to courses. These sub-directories were outside the public_html folder, with Moodle allowing access rather than denying-and-then-controlling as s2member is doing now. This was very convenient for protecting standalone web apps as I describe. Unfortunately this is no longer possible with Moodle 1.9 being replaced with 2, so I’m building my own LMS with WordPress and S2member – which in fact provides a much better experience.
These web apps in the protected folder would be served in iframes within either WordPress pages or, quite likely, shadowbox modals so I can control/direct the learner experience. They might also be served standalone as mobile web apps as well. All these learning/teaching web apps are assets that could be sold and/or distributed separately so I’d like not to have to modify them individually.
Shouldn’t it be possible to define access to a sub-directory, perhaps using htaccess, that checks s2membership level?
Thanks again,
Mike Smith