簡體   English   中英

301重定向-尾部斜杠web.config

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM