Page is a not externally linkable
- Google
-- Google SEO News and Discussion
---- Google Webmaster Tools Is Reporting Wordpress URL Redirects


g1smd - 7:13 pm on Jun 19, 2012 (gmt 0)


RewriteRule ^(.+)\.$ http://www.example.com/$1 [R=301,L]

The RegEx pattern reads to the end of the requested URL, then has to back off one step and retry. The redirect is issued and one trailing period is stripped.

For multiple periods there will be multiple chained redirects. This is a disaster.


I would do something completely different.
This RewriteRule goes near the beginning of the htaccess file:
RewriteRule \.$ /fixer.php [L]

In your non-www/www redirect add this line:
RewriteCond %{REQUEST_URI} !^/fixer\.php
otherwise you will expose "fixer.php" as a new URL when there is a non-www request with trailing periods.

In fixer.php detect the requested URL, clean it up using preg_match and preg_replace. Finally use the HEADER directive to send the 301 status and the new location including protocol and domain name.


Thread source:: http://www.webmasterworld.com/google/4466922.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com