httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matus UHLAR - fantomas <>
Subject Re: [users@httpd] cleanest/fastest way of redirecting aliases to canonical server names
Date Tue, 08 Feb 2011 13:44:31 GMT
On 29.01.11 02:38, Christoph Anton Mitterer wrote:
> I'm having a vhost, which is reachable via one canonical name, e.g.
>, and also via several aliases, e.g.,
>, etc.
> I want that whenever requests are made via one of the aliases, that
> those are redirected to the canonical name.
> IMHO there are about the following two ways:
> 1)
> - one vhost, which has the canonical name as ServerName, and the aliases
> as ServerAliases
> - and also has some RewriteCond+RewriteRules, making a redirect to the
> canonical address if HTTP_HOST is one of the aliases.
> 2)
> - two vhosts, the first having only the canonical name as ServerName (no
> ServerAlias)
> - the second, having the aliases as ServerName/ServerAliases
> - and also doing a Redirect /

3) use special modules as mod_redirtoservname (debian) or
mod_common_redirect (gentoo) that do this.
(unfortunately, the latter bugs on ssl sites)

Matus UHLAR - fantomas, ;
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Despite the cost of living, have you noticed how popular it remains? 

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message