Php – Running php files on ISS 7 without the file extension

handler-mappingsiisiis-7PHP

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.

Best Answer

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.