We have a web server with many virtual hosts following this scheme:

www.example.com
sub1.example.com
sub2.example.com
sub3.example.com
sub?.example.com

Now some of our more naive customers often try www.sub3.example.com resulting in a redirect to www.example.com.

Is there a configuration setting to automatically redirect all requests targeted at www.sub?.example.com to sub?.example.com?

Thanks in advance!

link|improve this question

76% accept rate
NO idea what server technology yyou talk about.... ...but it is possible. Basically it depends on the server. I know such customers, too ;) – TomTom Mar 10 '10 at 10:05
feedback

1 Answer

up vote 4 down vote accepted

Look for the ServerAlias directive. You can place that next to ServerName in your VirtualHost block

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.