問:如何將https無條件跳轉到http?因為我www.magge.cn網站之前設置了https,現在因為程序問題,https開頭的網址打開之后頁面是亂的,我只能打開http開頭的www.magge.cn.所以我想暫時將帶https的網址轉移到http.以后我網站程序正常了之后我再重新設置,所以我現在怎么樣才能把https開頭的網址,跳轉到http?,如何將https無條件跳轉到http?
答:您好,您可以使用以下規則試下,如仍存在問題,需要我司檢查調試,請另提交對應服務器工單,非常感謝您長期對我司的支持!
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="301" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_FROM_HTTPS}" pattern="^on$"/>
</conditions>
<action type="Redirect" url="http://www.magge.cn/{R:1}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
問:我現在服務器上的web文件是以下這樣的,換成你們給我的這些代碼之后,跳轉是可以了,但是后臺就無法使用了,所以現在是需要怎么調整這段代碼呢?
</rule> <rule name="Block spider"> <match url="(^robots.txt$)" ignoreCase="false" negate="true" /> <conditions> <add input="{HTTP_USER_AGENT}" pattern="AhrefsBot|SemrushBot|Webdup|AcoonBot|AhrefsBot|Ezooms|EdisterBot|EC2LinkFinder|jikespider|Purebot|MJ12bot|WangIDSpider|WBSearchBot|Wotbox|xbfMozilla|Yottaa|YandexBot|Jorgee|SWEBot|spbot|TurnitinBot-Agent|curl|perl|Python|Wget|Xenu|ZmEu" ignoreCase="true" /> </conditions> <action type="AbortRequest" /> </rule>
</rules>
</rewrite> </system.webServer>
</configuration>
答:您好,十分抱歉,這個我們無法直接判斷 出問題,需要根據實際訪問和查看服務器設置進行檢查。
【主機租用/vps、云主機】–【站點設置】–【配置偽靜態/301跳轉/自定義404錯誤】 您可以重新選擇這個工單分類進行提交,并提供服務器密碼,說明具體的鏈接地址,我們好測試核實,非常感謝您長期對我司的支持!