Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache redirect issue

Status
Not open for further replies.

btaber

Programmer
May 26, 2002
307
US
Currently, I have Apche set us a NameVirtualHost *, and each VirtualHost *:80, running multiple virtualhosts. I would like all of the virtualhosts to redirect to a url, if the calling hostname is so I tried this:

<VirtualHost *:80>
UseCanonicalName off
ServerName mail.*
DocumentRoot /home/mailredirect
</VirtualHost>

before all the virtals, but it is kinda screwey, sometimes works, sometimes not. Is there a way to pit a directive in all of the virtuals, like an If statement, that will do what I want, without a problem?

B
 
Hi mate,

There is no need to add anything to any of the other virtualhosts.

Try changing the ServerName directive to the following:

ServerName *.mail.*

Hope this helps Wullie


The pessimist complains about the wind. The optimist expects it to change.
The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top