問(wèn):我虛擬機(jī)IIS的,配置了https,首頁(yè)打不開(kāi),子頁(yè)能打開(kāi)、我用了兩條thinkphp的一條 規(guī)則和https規(guī)則打開(kāi)首頁(yè)提示301定向次數(shù)過(guò)多http://www.shuruixin.com 首頁(yè)就提示定向過(guò)多https://www.shuruixin.com/medical/product/cate/id/1.html<?xml version="1.0" encoding="UTF-8"?><configuration> <system.webServer> <rewrite> <rules> <rule name="ThinkPHP_NiPaiYi" stopProcessing="true"> <match url="^(.*)$" ignoreCase="false" /> <conditions logicalGrouping="MatchAll"> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" appendQueryString="true" /> </rule> <rule name="redirect to https" stopProcessing="true"> <match url="(.*)" /> <conditions> <add input="{HTTPS}" pattern="^OFF$" /> <add input="{HTTPS_HOST}" pattern="^(localhost)" negate="true" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="SeeOther" /> </rule> </rules> </rewrite> </system.webServer></configuration>
,https首頁(yè)提示301定向次數(shù)過(guò)多
答:您好,虛擬主機(jī)設(shè)置301跳轉(zhuǎn)https,請(qǐng)參考http://m.shinetop.cn/faq/list.asp?unid=1419
請(qǐng)使用
<rule name="301" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTP_FROM_HTTPS}" pattern="^on$" negate="true" />
</conditions>
<action type="Redirect" url="https://www.abc.com/{R:1}" redirectType="Permanent" />
</rule>
進(jìn)行跳轉(zhuǎn)即可。
非常感謝您長(zhǎng)期對(duì)我司的支持!