問:我想將【http://huanuo168.cn】、【http://www.huanuo168.cn】、【https://www.huanuo168.cn】三個域名都301到 https://huanuo168.cn,這樣寫web.config不對嗎?請教一下—<?xml version=\”1.0\” encoding=\”UTF-8\”?><configuration> <system.webServer> <rewrite> <rules> <rule name=\”Imported Rule 1\” stopProcessing=\”true\”> <match url=\”^(.*)$\” ignoreCase=\”false\” /> <conditions logicalGrouping=\”MatchAll\”> <add input=\”{HTTP_FROM_HTTPS}\” pattern=\”^on$\” /> <add input=\”{HTTP_HOST}\” pattern=\”^huanuo168.cn$\” /> </conditions> <action type=\”Redirect\” url=\”https://huanuo168.cn/{R:1}\” redirectType=\”Permanent\” /> </rule> <rule name=\”Imported Rule 2\” stopProcessing=\”true\”> <match url=\”^(.*)$\” ignoreCase=\”false\” /> <conditions logicalGrouping=\”MatchAll\”> <add input=\”{HTTP_FROM_HTTPS}\” pattern=\”^on$\” negate=\”true\” /> <add input=\”{HTTP_HOST}\” pattern=\”^(www.)?huanuo168.cn$\” /> </conditions> <action type=\”Redirect\” url=\”https://huanuo168.cn/{R:1}\” redirectType=\”Permanent\” /> </rule> </rules> </rewrite> </system.webServer></configuration>—按照上面設置,訪問【https://huanuo168.cn/】或【http://huanuo168.cn/】的時候出錯,瀏覽器提示:此網頁包含重定向循環ERR_TOO_MANY_REDIRECTShttps://www.huanuo168.cn/和http://www.huanuo168.cn/則可以正常訪問。,HTTPS域名301跳轉問題
答:您好,抱歉,應只需要一條規則即可,否則會有沖突造成重定向過多,如需我司詳細分析設置,請提交虛擬主機/數據庫問題 — 網站類問題 — 偽靜態\\301\\404相關設置,會有費用產生,非常感謝您長期對我司的支持!