On 29.01.11 02:38, Christoph Anton Mitterer wrote: > I'm having a vhost, which is reachable via one canonical name, e.g. > example.org, and also via several aliases, e.g. www.example.org, > example.com, 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 / http://example.org 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, uhlar@xxxxxxxxxxx ; http://www.fantomas.sk/ 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:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx