Forum Moderators: phranque
I have been reading a lot in this forum about redirects but I haven’t found anything covering redirects with empty spaces in the old URL (%20):
The rest of my redirects have been working fine but the one isn’t working.
redirect /old%20file.htm [newdomain...]
Can someone tell me what I should use in the .htaccess instead of the %20 (blank space).
Thanks
Welcome to WebmasterWorld [webmasterworld.com]!
Good question!
You could try RedirectMatch, which allows the use of regular expressions, and then try using an escaped space:
RedirectMatch 301 ^/old\ file\.htm$ http://www.newdomain/new_file.com/
For more information on RedirectMatch, see the Apache mod_alias documentation [httpd.apache.org].
Jim