simple (?) htaccess question |
[eluser]mvdg27[/eluser]
Hi guys, I think I have a simple htaccess question, but I can't find on Google how to achieve it. I hope some htaccess experts can give me a hand here ![]() Ok. I what I want to do, is redirect a subdomain, to the same url, without the subdomain (or actually the www-subdomain). So for example: http://test.mydomain.com => http://www.mydomain.com and http://test.mydomain.com/controller/function => http://www.mydomain.com/controller/function Any ideas? Preferably in a way that doesn't hurt the Google ranking. Thanks! Michiel
[eluser]InsiteFX[/eluser]
Here. Code: # Redirect non-www to www Enjoy InsiteFX
[eluser]mvdg27[/eluser]
@bretticus: Thanks! Great resource, it's in my bookmarks now! @InsiteFX: Thanks. Your code works, but not exactly how I wanted it. If I type http://mydomain.com it redirects to http://www.mydomain.com, which is good. However when I type: http://test.mydomain.com, it redirects to http://www.mydomain.com/test/, which is not what I'm looking for. It shouldn't append the subdomain as a URI-element |
Welcome Guest, Not a member yet? Register Sign In |