无限星辰工作室-客户无限互联网动力之源
标题:
IIS8 web.config 301跳转规则
[打印本页]
作者:
crx349
时间:
2014-3-23 13:36
标题:
IIS8 web.config 301跳转规则
分享一个iis8下的web.config规则
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<security>
<requestFiltering allowDoubleEscaping="true" />
</security>
<rewrite>
<rules>
<rule name="Redirect xmspace.net to www" patternSyntax="Wildcard" stopProcessing="true">
<match url="*" />
<conditions>
<add input="{HTTP_HOST}" pattern="xmspace.net" />
</conditions>
<action type="Redirect" url="http://www.xmspace.net/{R:0}" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
复制代码
说明:将根域名跳转到www二级域名
作者:
crx349
时间:
2022-9-24 21:50
强制 https
<rule name="HTTP to HTTPS redirect" 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>
复制代码
欢迎光临 无限星辰工作室-客户无限互联网动力之源 (https://xmspace.net/)
Powered by Discuz! X3.4