问:如何将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错误】 您可以重新选择这个工单分类进行提交,并提供服务器密码,说明具体的链接地址,我们好测试核实,非常感谢您长期对我司的支持!