homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

redirecting URLs with %20 in string

 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




 6:07 pm on Dec 30, 2010 (gmt 0)

Ya, you can quote the filename/directory name in an htaccess redirect rule.


 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.


Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved