問:域名設(shè)置主域名跳轉(zhuǎn)到帶www的域名,一直無(wú)法生效,按照官網(wǎng)教程設(shè)置了都不行,設(shè)置如下:<rule name="301Redirect" stopProcessing="true">
                    <match url="(.*)" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{HTTP_HOST}" pattern="^abc1.com$" />
                        <add input="{HTTP_HOST}" pattern="^abc2.com$" />
                    </conditions>
                    <action type="Redirect" url="http://www.abc1.com/{R:0}" redirectType="Permanent" />
                </rule><rule name="301" stopProcessing="true">                    <match url="^(.*)$" ignoreCase="false"></match>                    <conditions logicalGrouping="MatchAll">                                                <add input="{HTTP_FROM_HTTPS}" pattern="^on$" negate="true"></add>                    </conditions>                    <action type="Redirect" url="https://www.sryun.net/{R:1}" redirectType="Permanent"></action></rule>
以上2種設(shè)置都不起作用,應(yīng)該如何設(shè)置?我系統(tǒng)是2016,用的建站助手。
附上我現(xiàn)在的web.config文件內(nèi)容:
<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer>         <rewrite>             <rules>             <rule name="HttpToHttps" stopProcessing="true">                   <match url="(.*)" />                   <conditions>                   <add input="{HTTPS}" pattern="off" ignoreCase="true" />                   </conditions>                   <action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />             </rule>      <rule name="301Redirect" stopProcessing="true">                    <match url="(.*)" />                    <conditions logicalGrouping="MatchAny">                        <add input="{HTTP_HOST}" pattern="^sryun.net$" />                    </conditions>                    <action type="Redirect" url="https://www.sryun.net/{R:0}" redirectType="Permanent" />                </rule>               <clear />             </rules>         </rewrite>        <handlers>            <remove name="PHP_FastCGI" />            <add name="isapi" path="*" verb="*" modules="IsapiModule" scriptProcessor="C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness32" />        </handlers>        <httpRedirect enabled="false" destination="https://www.sryun.net" exactDestination="true" httpResponseStatus="Permanent" /> <modules runAllManagedModulesForAllRequests="true"> <remove name="UrlRoutingModule" />     </modules>    </system.webServer> </configuration> 
,301跳轉(zhuǎn)都不起作用

問:用這段好像已經(jīng)起作用了。<rule name="301" stopProcessing="true">                    <match url="^(.*)$" ignoreCase="false" />                    <conditions logicalGrouping="MatchAll">                                              <add input="{HTTPS}" pattern="^on$" negate="true" />                    </conditions>                    <action type="Redirect" url="https://www.sryun.net/{R:1}" redirectType="Permanent" />               </rule>

更多關(guān)于云服務(wù)器域名注冊(cè),虛擬主機(jī)的問題,請(qǐng)?jiān)L問三五互聯(lián)官網(wǎng):www.shinetop.cn
贊(0)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享網(wǎng)絡(luò)內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。郵箱:3140448839@qq.com。本站原創(chuàng)內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明出處:三五互聯(lián)知識(shí)庫(kù) » 301跳轉(zhuǎn)都不起作用-云服務(wù)器問題

登錄

找回密碼

注冊(cè)