Forum Moderators: phranque
[edited by: jdMorgan at 3:02 pm (utc) on Jan. 17, 2006]
[edit reason] Removed/obscured specifics per TOS. [/edit]
Welcome to WebmasterWorld!
This can be done with two lines of code using mod_rewrite.
Check the requested subdomain using RewriteCond testing %{HTTP_HOST}. If present, and not equal to "www", then redirect to your main domain using a 301 permanent redirect.
For more information, see the documents cited in our forum charter [webmasterworld.com] and the tutorials in the Apache forum section of the WebmasterWorld library [webmasterworld.com].
Jim