I have a problem… When typing www.mysite.com/test my site messes up, but if I type mysite.com/test everything is just fine… I think it is in my .htaccess file, but cant figure out where…
I have the force www and remove www code in the tutorial linked in my signature which will work on both Apache 1.x and Apache 2.x (hash, yours will not work on Apache 1.x because of the double // after the domain).
Now, as XTX asked: What is your mod_rewrite? What is your test URL?
Hmmm, I see that you are NOT testing for case INsensitive domain. Is there a reason to allow MySite.com to pass through without being redirected to the www’d version?
Are you CERTAIN that you’re using Apache 2.x?
While I’m glad that you’re satisfied with your solution, I hope others do NOT use your example as guidance for those two omissions.