I got this mod_rewrite that i use to redirect all my old links to my new forum. Somehow it doesnt redirect properly. Instead of that it redirects to http://www.domainname.com/forum/ it redirects to http://domainname.com/forum/ . Anyone knows what could the reason for this.
I may not be following what you are trying to do, but the statements above will do this - if the Host header does not begin with "www.", redirect the browser to "http: //www. domainname.com/host-name/url". For example, if somebody requests "http: //forums. domainname.com/index.html", they will be redirected to "http: //www. domainname.com/forums/index.html". J.D.
It looks like you are saying it redirects to www.domain.com/forum/ and then you say, no wait, it redirects to domain.com/forum/. It looks like you just don't want www in the URL. If that's it, try RewriteRule (.*) http://domainname.com/%1/$1 [R=301,L] If that doesn't fix it, post an old URL, and the new URL you want. Or are you trying to move it from (.*).domain.com to www.domain.com/forum/$1/
Thanks for the responses. Yes im trying to move it from (.*).domain.com to www.domain.com .Im using this mod rewrite cuase i still have thousands of old backlinks that i dont want to loose. Its weird cause before i didnt have any problems with this redirection but since i moved to my new host i do. But maybe it has to do with the fact that i just recently changed my dns zone to my new host. I ll give it one more day to resolve fully and then will see if that might be the problem.