Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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!

share|improve this question
    
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

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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