Forum Moderators: phranque

Message Too Old, No Replies

Redirection subdomain to root domain

         

sandiegos

6:07 pm on May 21, 2012 (gmt 0)

10+ Year Member



Hello, I want to get this effect in htaccess:

http://example.com -> redirect to http://www.example.com

http://blebleble.example.com -> redirect to http://www.example.com (redirect random subdomain to root domain)

http://www.example.com -> there is no redirection

http://subdomain.example.com -> there is no redirection (a predetermined sub-domain)

Please help me :)

lucy24

10:45 pm on May 21, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Well, start by reading the first page or two of posts in this thread. Your question is definitely in the Top Ten, so you will find much advice and guidance. When you think you've got it figured out, come back with your code.

Bonus points for using example.com up front without needing to be told ;)