<?xml version=\"1.0\" encoding=\"UTF-8\"?> <configuration> <system.webServer> <rewrite> <rules> <rule name=\"301Redirect\" stopProcessing=\"true\"> <match url=\"(.*)\" /> <conditions logicalGrouping=\"MatchAny\"> <add input=\"{HTTP_HOST}\" pattern=\"^xxx.com$\" /> </conditions> <action type=\"Redirect\" url=\"http://www.xxx.com/{R:0}\" redirectType=\"Permanent\" /> </rule> </rules> </rewrite> </system.webServer> </configuration>
把以上代码写入web.conf中即可
把改为x.com改为需要重定向的网址
把3w.x.com改为重定向到的网址