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 want to do something very simple on a Windows Server 2003 machine; have the web server serve a redirect instead of a particular page's content, whenever the user tries to navigate to that particular page.

The default document is "index.html", so if a user types "http://mywebsite.com/", they will normally be taken to "index.html".

I have set a redirect in IIS on "index.html", to go to "http://someotherwebsite.com/". In the content view, the status for that page says "Redirected to http://someotherwebsite.com/".

The problem is, IIS is serving the content of "index.html", instead of redirecting to the new web site, when a web browser accesses "http://mywebsite.com/", but redirects as expected if users navigate directly to "http://mywebsite.com/index.html".

I would expect that regardless of how the user gets to "index.html", when the server is asked to serve the page, it would always serve the redirect, rather than the page content.

share|improve this question

1 Answer 1

Try adding a meta refresh tag to index.html.

<meta http-equiv="refresh" content="0;url=http://someotherwebsite.com/">
share|improve this answer

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.