問:我想將【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>—按照上面設(shè)置,訪問【https://huanuo168.cn/】或【http://huanuo168.cn/】的時候出錯,瀏覽器提示:此網(wǎng)頁包含重定向循環(huán)ERR_TOO_MANY_REDIRECTShttps://www.huanuo168.cn/和http://www.huanuo168.cn/則可以正常訪問。,HTTPS域名301跳轉(zhuǎn)問題
答:您好,抱歉,應(yīng)只需要一條規(guī)則即可,否則會有沖突造成重定向過多,如需我司詳細(xì)分析設(shè)置,請?zhí)峤?span id="kekmguu6co" class='wp_keywordlink_affiliate'>虛擬主機(jī)/數(shù)據(jù)庫問題 — 網(wǎng)站類問題 — 偽靜態(tài)\\301\\404相關(guān)設(shè)置,會有費用產(chǎn)生,非常感謝您長期對我司的支持!