![](/img/trans.png)
[英]non-www with trailing slash 301 redirect in web.config (Single Redirect)
[英]301 redirection - Trailing Slash web.config
我想从http://www.example.com/到http://www.example.com进行永久301重定向。
我曾尝试在web.config中使用以下代码,但无法正常工作。 我还需要做其他更改吗?
<rule name="SEO - Remove trailing slash" stopProcessing="false">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" url="{R:1}" />
</rule>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.