我想在Windows Server 2003机器上做一些非常简单的事情; 当用户试图导航到特定页面时,Web服务器将提供redirect而不是特定页面的内容。
默认的文档是“index.html”,所以如果用户键入“ http://mywebsite.com/ ”,通常会被带到“index.html”。
我在“index.html”的IIS中设置了一个redirect,转到“ http://someotherwebsite.com/ ”。 在内容视图中,该页面的状态显示为“ redirect到http://someotherwebsite.com/ ”。
问题是,IIS服务于“index.html”的内容,而不是redirect到新的网站,当一个网页浏览器访问“ http://mywebsite.com/ ”,但redirect如果用户直接导航到“ http://mywebsite.com/index.html ”。
我希望不pipe用户如何得到“index.html”,当服务器被要求提供页面时,它总是服务于redirect,而不是页面内容。
尝试添加一个元刷新标签到index.html。
<meta http-equiv="refresh" content="0;url=http://someotherwebsite.com/">