[Linux-disciples] Apache: proper use of UseCanonicalName?
Stephen R Laniel
steve at laniels.org
Mon Jan 29 13:55:23 EST 2007
Suppose I have a virtual host defined in my Apache config, and it
has several names -- e.g.,
ServerName foo.com
ServerAlias foobar.com
ServerAlias www.foo.com
ServerAlias www.foobar.com
Suppose now that when someone visits any of the
ServerAliases, I want him to be redirected to the
ServerName. I thought that the appropriate way to do this
was UseCanonicalName:
http://httpd.apache.org/docs/2.2/mod/core.html
but Adam suggests that mod_rewrite is the appropriate way.
Seems to me that UseCanonicalName -- if it does what I
thought it did -- would be the appropriate place for it.
With mod_rewrite, I'd have to write N different rules
corresponding to the N different ServerAliases; with
UseCanonicalName, I use one.
Am I misunderstanding what UseCanonicalName does?
--
Stephen R. Laniel
steve at laniels.org
Cell: +(617) 308-5571
http://laniels.org/
PGP key: http://laniels.org/slaniel.key
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20070129/feaebfdb/attachment.pgp
More information about the Linux-disciples
mailing list