Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I do have a similar question posted on Server Fault.

Still, I want to explore various ways by which one can effectively redirect traffic coming to a Windows Server. Is it possible that I have a index.php file but let the URL to it be index.htm? On apache, I could do this with mod-rewrite, but I am not sure how to do this on a Windows Server.

I am currently reading about named a 3rd party module ISAPI_Rewrite. But has anyone of you come across any similar situation? If yes, can you please show me the way to do it?

Sorry I am a complete noob with Windows Server, so I am going to require a little extra effort from all of you guys.

share|improve this question

For redirection of all requests, you can do this in IIS. Runt inetmgr in Windows 2008 to open the IIS Manager, and select the web site. Then, in Features View you will see under IIS a button called HTTP Redirect.

There is another button for selecting default document, so if you want it to be index.php, you can do that here.

For redirecting mobile users, have a look at this post about IIS rewrite rule.

share|improve this answer
I just configured IIS on a Windows XP machine to test things out. I have my mobile device detection mechanism working perfectly, would just want to do the above. I just try your solution out and revert – Sheikh Aman Apr 4 '11 at 6:28

In ISAPI_Rewrite the following code will create 301-redirect to virtual .html file and rewrite back to .php

RewriteEngine on
RewriteBase /

RewriteRule index\.php$ /index.html [NC,R=301,L]
Rewriterule index\.html$ /index.php [NC,L]
share|improve this answer
I have found the solution with IIRF. see it here:… – Sheikh Aman Jul 11 '11 at 4:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.