多域名, 301
近期遇到过一种情况,由于备案接入,需要把主域解析到一个虚拟主机上,然后301到www的域名上,不可能每个域名都买个虚拟机,所以多个域名可以这么具体操作办法! <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="WWW Redirect" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^A.com$" /> </conditions> <action type="Redirect" url="https://www.A.com/{R:0}" redirectType="Permanent" /> </rule> <rule name="WWW Redirect2" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^B.com$" /> </conditions> <action type="Redirect" url="https://www.B.com/{R:0}" redirectType="Permanent" /> </rule> <rule name="WWW Redirect3" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^C.net$" /> </conditions> <action type="Redirect" url="http://www.C.net/{R:0}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> </configuration> |
解决https下IE上传图片不显示问题