web.config
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpRedirect enabled="true" destination="http://www.onestopweb.cn" /> </system.webServer> </configuration>
例如:在浏览器输入 baidu.com,会重定向到 https://www.baidu.com/。
效果图:
web.config
<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <httpRedirect enabled="true" destination="http://www.onestopweb.cn" /> </system.webServer> </configuration>
例如:在浏览器输入 baidu.com,会重定向到 https://www.baidu.com/。
效果图: