问题
I've got an ASP.NET website that uses URLRewrite 2 to remove trailing slashes from the URL.
We noticed that Safari on Mac does not obey this rule. It always leaves the trailing slash in the URL. SEO Moz is showing both URLs which appears to be a potential duplicate content issue.
Here is the URLRewrite rule in our Web.Config
<rule name="Remove trailing slash" stopProcessing="true">
<match url="(.*)/$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="{R:1}" />
</rule>
Here is the website in question: http://www.kurtzandblum.com/ (the slash will be removed except in Safari)
I'm trying to decide if...
- This is a harmless bug in Safari?
- My rewrite script is flawed.
- I should switch it to "add" trailing slashes.
Google says slash or no slash will work http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
Thanks for any insight.
回答1:
It's just how Safari is handling URLs. There is no impact on SEO, so you don't need to do anything.
Your URLs are looking fine in Chrome.
来源:https://stackoverflow.com/questions/11348479/safari-adds-trailing-slash