很抱歉,如果我在这里完全混淆并咆哮错误的树!
我知道在Apache服务器上我可以设置.htaccess文件并使用Redirect将特定网址重定向到特定的新网址
Redirect /olddirectory/oldfile.html /newdirectory/newfile.html
IIS服务器是否有类似的功能/能力?除了IIS& amp;之外,我不知道有关设置的大量内容。 asp.net,但我试图指出IT人员正确的方向,即:不使用元刷新/重定向!如果需要,我可以找到更多信息。
答案 0 :(得分:0)
您需要按照以下步骤操作:
1)如果未安装https://www.iis.net/downloads/microsoft/url-rewrite
,请将IIS URL重写模块安装到您的服务器2)在您网站的web.config中添加以下规则:
<rule name="redirect1" enabled="true" stopProcessing="true">
<match url="olddirectory/oldfile.html" />
<action type="Redirect" url="/newdirectory/newfile.html" />
</rule>
然后您将收到从/olddirectory/oldfile.html
到/newdirectory/newfile.html