httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JBT <>
Subject Re: [users@httpd] Redirect HOSTname to https virtual host
Date Wed, 12 Jan 2005 18:38:12 GMT
On Wed, 12 Jan 2005 11:31:55 +0100, Axel-St├ęphane  SMORGRAV
<> wrote:
> I am not certain this meets all your needs, but it might be a good starting point.
> RewriteCond %{HTTP_HOST} ^mail\.domain\.net
> RewriteRule ^/(.*)$$1 [R,L]
> RewriteCond $1          =mail
> RewriteRule ^/(.*)$ [R,L]

Perfect, this does the trick.
Turns out I hadn't even configured DNS for yet
(it does need a separate record, next to *, and I had
forgotten that),
but this rewrite is nicer than the one I had, and doesn't interfere
with the rest.

> If you have defined "ServerName" like you say in another mail,
> I do not think the last rewrite rule should is necessary
> provided you have set "UseCanonicalName On"

Now I have ;-) Thanks.
The rewrite module is one of the greatest things the internet has ever known,
if you ask me! I'm especially thrilled with its time-based options. Amazing.


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