Forum Moderators: phranque

Message Too Old, No Replies

Redirects where files/folders have spaces in name

         

Mokita

8:20 pm on Sep 18, 2006 (gmt 0)

10+ Year Member



I'm just finishing redesigning a very old site that had horrible folder names that look like this:

/keyword1 keyword2 keyword3/

... and file names like this:

/this is a page.htm

Can .htaccess/Apache deal with the spaces - or do they need to be escaped somehow?

Will this work correctly:

Redirect 301 /keyword1 keyword2 keyword3/ http://www.example.com/folder/
Redirect 301 /this is a page.htm http://www.example.com/page.html

jdMorgan

1:04 am on Sep 19, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



No, you will need to escape them as "\ " if they are spaces, or "\%20" if they are encoded.

Jim

Mokita

3:46 am on Sep 19, 2006 (gmt 0)

10+ Year Member



Thanks Jim!
I suspected that would be the case, but wasn't sure how to do it.