Forum Moderators: phranque
The incoming links point to URLs in the form of www.domain.com/some.folder/. or www.domain.com/some.file.html.
The site issues a 301 redirect for those to strip the trailing dot from the URL... except that it doesn't work for www.domain.com/. at all.
However, do note that an incoming link to www.domain.com/. is actually listed in Google Webmastertools under links to the root domain.
So, do I really need to bother redirecting for that single case?
A different rule for www.domain.com. and www.domain.com./ does work as expected. Both redirect to www.domain.com/ as expected.
So how/why doesn't the the redirect for "/." work? I'd imagine a simple rule in .htaccess like
RewriteRule ^(([^/]+/)*)\.$ http://www.example.com/$1 [R=301,L]
Jim
RewriteRule ^(([^/]+/)*[^.]*)\.$ http://www.example.com/$1 [R=301,L]
RewriteCond %{DOCUMENT_ROOT}/$1 -f
RewriteRule ^(([^/]+/)*[^.]*)\.$ http://www.example.com/$1 [R=301,L]
#
RewriteCond %{DOCUMENT_ROOT}/$1/ -d
RewriteRule ^(([^/]+/)*[^.]*)\./?$ http://www.example.com/$1/ [R=301,L]
Jim
This has been ongoing; I thought I had fixed all cases months ago, but WMT threw up those new cases in the last week or two.
.
However, I do note that an incoming link to www.domain.com/. is actually listed in Google Webmastertools under links to the root domain, i.e. in the same list as links to www.domain.com/ are, so maybe I don't need to fix it.
A regression bug in such an obscure URL clean-up routine buried deep in a search engine's back-end processing routines might go unnoticed and/or un-fixed for a long time...
Asked why I canonicalize everything, I answer, "Because I can." :)
Jim