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