Windows – How To Treat Any File As PHP In Windows IIS 7

iisiis-7PHPwindows

I want .any file (could be .this or .that etc.) to be treated as a .php file and parse .php code on my windows 2008 server running IIS 7.

How would I go about doing so?

Best Answer

It was a while since I did this, but the process last time was something like this:

  1. Start>control panel>administrative tools>Internet Information Service

  2. Choose the website you want to change (typically the default site) and then open the properties.

  3. Home Directory tab, make sure execute permissions are set to "Scripts and Executables" then go to Configuration

  4. Here you click add, then you add the extension for all request types. Give the path to php.exe.

You might have to restart iis afterwards.