| redirecting URLs with %20 in string
|
nmjudy

msg:4247308 | 5:10 am on Dec 30, 2010 (gmt 0) | I have numerous pages showing up in Google Webmaster tools that are not found. These are links from other sites linking to my site. The links are broken because of an extra space added to the URL (%20 characters). Is there a way to redirect a link from http://www.example.com%20 to http://www.example.com Thanks
|
Brett_Tabke

msg:4247568 | 6:07 pm on Dec 30, 2010 (gmt 0) | Ya, you can quote the filename/directory name in an htaccess redirect rule.
|
jdMorgan

msg:4249448 | 5:35 pm on Jan 5, 2011 (gmt 0) | Assuming that you already have other RewriteRules set up and working in example.com/.htaccess:
RewriteRule ^(.*)\ +$ http://www.example.com/$1 [R=301,L]
Place this new rule before your domain canonicalization redirect (if you have one) and before all internal rewrites. You should modify any and all more-specific URL redirects (which should precede this new rule) to allow for the optional presence of this trailing space as well. Jim
|
|
|