1

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.

0

Try adding a meta refresh tag to index.html.

<meta http-equiv="refresh" content="0;url=http://someotherwebsite.com/">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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