I have Apache 2.2 set up to accept PUTs and funnel them to a specific handler script /put.php as shown below in the Directory Directive in httpd.conf:
<Directory />
Options FollowSymLinks
AllowOverride All
Script PUT put.php
</Directory>
This has always worked, no matter the request as long as the method is PUT in the past. I used curl to validate this using a request URL of "/" which pointed to index.html.
I recently found a need to convert index.html to index.php to do some session handling, and suddenly my PUT requests stopped being handled by /put.php as soon as the file became index.php.
I realize that one solution is to point all PUT requests to /put.php, but we have an app that is hard coded to send them to / which doesn't work anymore since the change to index.php.
It'd be nice to be able to get index.php to still send PUT requests to it to /put.php, but I haven't been able to find a way.
The apache logs show that the PUT requests are being handled properly (201 response and no error), but the behavior is just that it never redirects to /put.php as it used to.
I also tried leaving the page as html, and adding the following line to the httpd.conf prior to the "Script PUT /put.php" directive:
AddType application/x-httpd-php .html
which then parsed the html page with the php parser, but then I got the same effect (No redirection to put.php) as when the page was called index.php and parsed by php.
Anyone have any ideas or encountered this before? It is as if when I turn index.html into index.php and send to the php parser it is unable to redirect any longer using the "Script PUT" directive.