我在一台服务器上运行IIS 8.5中的网站。
http(s)://aaa.oldpage.com
http(s)://bbb.oldpage.com
http(s)://ccc.oldpage.com
我希望他们重定向到
https://aaa.newpage.com
https://bbb.newpage.com
https://ccc.newpage.com
最简单的方法是什么?
答案 0 :(得分:0)
我删除了旧网站的所有内容并添加了一个 Web.config 到具有以下重定向规则的根文件夹。
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="https://aaa.newpage.com" exactDestination="true" httpResponseStatus="Permanent" />
</system.webServer>
</configuration>
现在,如果用户尝试访问旧页面&#34; http(s)://aaa.oldpage.com" ;,它将重定向到新页面&#34; https://aaa.newpage.com& #34;