1

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?

3
  • 1
    Though this may not be a concern for you, you are setting yourself up for an astoundingly large security hole.
    – zetavolt
    Mar 2, 2010 at 20:41
  • @Zephyr Pellerin: how so? What would I have to worry about simply making a .html file parse php code? If I did so on a dedicated server that only I can access? Mar 3, 2010 at 17:28
  • LFI and RFI come to mind as problems, if you truly are the only one who has access its not a problem but god forbid it ever goes production.
    – zetavolt
    Mar 3, 2010 at 21:31

1 Answer 1

1

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.

3
  • Thanks pehrs , but as for number 2 - open properties? Do I right click? I don't see any "properties" value listed anywhere for any site - default or not ? Mar 3, 2010 at 19:24
  • Or 3? What do you mean by the home directory tab? I'm using IIS 7. Mar 3, 2010 at 19:28
  • Oh, sorry, If you are on IIS 7 it's something like Features View panel, then Handler Mappings see technet.microsoft.com/en-us/library/cc771240%28WS.10%29.aspx
    – pehrs
    Mar 4, 2010 at 16:42

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .