Forum Moderators: phranque
The problem I've run into is that to download/open the files to edit them, the client needs to send a GET request to the server. But the server can't distinguish between the webDAV GET and a normal GET from a browser, which is obviously needed to run the scripts. So, when trying to open the scripts for editing via my WebDAV client, I find that they're actually being executed.
The ideal way around this problem would be to disable PHP depending on the user agent, but Apache doesn't seem to give an option for this. As an alternative, I've tried creating an alias to my script directory, and then a <Location> directive for this alias which contains the RemoveType .php directive - this doesn't work (actually RemoveType doesn't seem to work at all...)
Any ideas or do I need to go back to using FTP to do this?
The server is running Apache 2.2.3 and PHP 5.1.6 on CentOS
Thanks
James
# webdav access to /dev
<Location /dev>
Order Allow,Deny
Allow from all
Dav Off
AuthType Basic
AuthName "Development Server"
AuthUserFile /var/www/auth/.basic_pw
Require valid-user
</Location>
alias /dav /var/www/html/dev
<Location /dav>
Order Allow,Deny
Allow from all
Dav On
AuthType Basic
AuthName "Development Server"
AuthUserFile /var/www/auth/.basic_pw
Require valid-user
php_value engine off
</Location>