I'm moving a PHP app to my IIS 7 web server.
A lot of the files in the application are php files, but don't have the php extension (in fact they have no file extension). This works fine on the old Apache hosting, but I can't get it to work on IIS 7.
I've been trying to modify the handler mappings, but I don't know how to map files with no extension to the PHP handler.
I tried just using *, but as I suspected static files like jpegs were also run through PHP and it didn't like this.
Thanks for your help.
You are probably going to have to add another handler for the files that you don't want the PHP executable to try and parse. I don't know how to tell the PHP interpreter to not interpret certain files based on extension.
The standard way to do this is to add a mime type and handler for *. files, however as you have pointed out, this will result in all files not already covered by a handler being handled by PHP, which is not what you want.
I guess the only options I can think of are to either do that and then add handlers for all the files you don't want PHP to handle or adding extensions to this files. If there are alot of them you could perhaps use a find and replace utility to add file extensions.
You need to make sure what module is used in Apache and how is the handle mapping is implemented in PHP on Unix to port it successfully in IIS 7.
Using FastCGI to Host PHP Applications on IIS 7.0. This should help..
(source: iis.net)
. Just take care of the Handler Mapping section.. and PHP should work.