Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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: serverfault.com/questions/254495/redirecting-with-web-config/… –  Sheikh Aman Jul 11 '11 at 4:55

Your Answer

 
discard

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.