脚本宝典收集整理的这篇文章主要介绍了php – 如何对web.config文件中的某些文件强制使用http,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
<?XMl version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <rewrITe> <rules> <rule name="Force HTTP" stopPRocessing="true"> <match url="(.*)/page1.PHP" ignoreCase="false"/> <match url="(.*)/page2.PHP" ignoreCase="false"/> <conditions> <add input="{HTTPS}" pattern="ON" ignoreCase="true"/> </conditions> <action tyPE="redirect" url="http://{HTTP_HOST}{REQUEST_URI}" redirectType="Permanent" /> </rule> </rules> </rewrite> </system.webServer> </configuration>@H_406_4@我在IIS 7 Web服务器中工作,用于Windows中的程序
<rule name="Force HTTP" stopProcessing="true"> <match url="^page[12].PHP(.*)" /> <conditions> <add input="{HTTPS}" pattern="^ON$" /> </conditions> <action type="Redirect" url="http://{HTTP_HOST}/{R:0}" redirectType="Permanent" /> </rule>
url =“^ page [12] .PHP(.*)”将匹配以page1.PHP或page2.PHP开头的任何url.该操作将请求重定向到https:// {HTTP_HOST} / {R:0},其中{R:0}包含所请求的路径.
以上是脚本宝典为你收集整理的php – 如何对web.config文件中的某些文件强制使用http全部内容,希望文章能够帮你解决php – 如何对web.config文件中的某些文件强制使用http所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。