Redirect 301 for pages with blank spaces in names


#1

Hi,
When I do a redesign, I normally use a .htaccess file with redirects like this:

redirect 301 /oldfile.html http://www.domainname.com/newfile.html

Normally this works fine, but the old file names have blank spaces in them. I can’t just add the blank spaces to the .htaccess file, and I’ve tried replacing the blank spaces with percentsign20, but it’s not working.

Has anyone been able to redirect filenames with blank spaces in them?

I’m hoping this is actually possible.


#2

I found the solution here:
http://www.tamingthebeast.net/articles3/spiders-301-redirect.htm

You add quotation marks around the file names and leave the blank spaces in:

redirect 301 “/old file.html” http://www.domainname.com/newfile.html

Hope this helps someone else!
Jill