![](/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.