Forum Moderators: phranque

Message Too Old, No Replies

help redirect url with spaces

         

content_adj

6:44 am on Feb 3, 2007 (gmt 0)

10+ Year Member



I want to redirect

[mydomain.com...]
to
[mydomain.com...]

.htacess code

RedirectMatch permanent ^/one%20two%20three.htm$ [mydomain.com...]

I used this code in my htaccess. it is not redirecting to the new url but only goes to the old page (one%20two%20three.htm).

Please help...

jdMorgan

4:38 pm on Feb 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How about this:

RedirectMatch permanent ^/one\ two\ three\.htm$ http://mydomain.com/a-b-c/one-two-three/

If that doesn't work, you can use mod_rewrite to do this.

Jim

wheelie34

6:16 pm on Feb 4, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just encountered a similar problem and cant work out what to do, my code needs to be redirected to a php?two words

Redirect 301 /folder/old-file-name.htm http://www.example.com/file-name.php?variable=two words

When I upload it the site dies, any idea what to do, I cant really change the variable's name, is there another way around it.

When the new URL is called the server ads %20 between the words, is it OK to do that in the htaccess, will spiders get confused?

Cheers