Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Have your cake and php too with aliases' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Have your cake and php too with aliases
Authored by: bo3behemoth on Sep 15, '05 01:08:23PM
I've been having the same difficulties. Turning off php and other server side scripting stuff is fine, but not if you're trying to edit a php file remotely that you then want others to use. Using aliases you can do both.

From the Apache mod_dav documentation:

======================

Complex Configurations One common request is to use mod_dav to manipulate dynamic files (PHP scripts, CGI scripts, etc). This is difficult because a GET request will always run the script, rather than downloading its contents. One way to avoid this is to map two different URLs to the content, one of which will run the script, and one of which will allow it to be downloaded and manipulated with DAV.


Alias /phparea /home/gstein/php_files
Alias /php-source /home/gstein/php_files
<Location /php-source> DAV On
      ForceType text/plain
</Location>
With this setup, http://example.com/phparea can be used to access the output of the PHP scripts, and http://example.com/php-source can be used with a DAV client to manipulate them.

[ Reply to This | # ]