Safari添加尾随斜杠 [英] Safari Adds Trailing Slash
问题描述
我有一个使用URLRewrite 2从URL删除斜杠的ASP.NET网站.
I've got an ASP.NET website that uses URLRewrite 2 to remove trailing slashes from the URL.
我们注意到Mac上的Safari不遵守此规则.它始终在URL中留下斜杠.SEO Moz显示了两个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.
这是我们Web.Config中的URLRewrite规则
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>
这里是有问题的网站: http://www.kurtzandblum.com/(斜杠将除了在Safari中被删除)
Here is the website in question: http://www.kurtzandblum.com/ (the slash will be removed except in Safari)
我正在尝试确定是否...
I'm trying to decide if...
- 这是Safari中无害的错误吗?
- 我的重写脚本有缺陷.
- 我应该将其切换为添加"尾部斜杠.
Google说斜杠或不斜杠都可以工作http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
Google says slash or no slash will work http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
感谢您的见解.
推荐答案
这就是Safari处理URL的方式.对SEO没有影响,因此您无需执行任何操作.
It's just how Safari is handling URLs. There is no impact on SEO, so you don't need to do anything.
您的网址在Chrome浏览器中看起来不错.
Your URLs are looking fine in Chrome.
这篇关于Safari添加尾随斜杠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!