Forum Moderators: phranque

Message Too Old, No Replies

Redirection with .htaccess file

querystring to be removed

         

Arockiam

7:45 am on Sep 22, 2004 (gmt 0)



Hi
I want to redirect all requests to my requests to another URL.Currently I using Redirect Permanent in the .htaccess file. I am facing one problem in this. The subdirectries in the URL are appended to the redirected URL. for eg, this is my old URL
[test.example.com...] Now I want to redirect this to [new.example.com...] The support directory had many sub directries. so i want to redirect if the URL contain the word "support". But the directory names and filenames which present after support, should not be appended to the redirected URL.

Can any one please help me in this?

Thanks

[edited by: jdMorgan at 5:46 pm (utc) on Sep. 22, 2004]
[edit reason] examplified domain name per TOS [/edit]

jdMorgan

5:49 pm on Sep 22, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Arockiam,

Welcome to WebmasterWorld!

This redirect is easily done with mod_rewrite, and possibly also with the RedirectMatch directive, which may be more familiar to you. Our charter [webmasterworld.com] contains links to resources which you may find helpful in writing the code or in asking more specific questions, as well as the policies of this forum.

Jim