httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JBT <jul...@gmail.com>
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
<Axel-Stephane.SMORGRAV@europe.adp.com> 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 ^/(.*)$     https://mail.domain.net/$1 [R,L]
> 
> RewriteCond $1          =mail
> RewriteRule ^/(.*)$     https://mail.domain.net/ [R,L]

Perfect, this does the trick.
Turns out I hadn't even configured DNS for mail.domain.net yet
(it does need a separate record, next to *.domain.net, 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 domain.net" 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.
-- 
Adios

Julius
http://jult.net

---------------------------------------------------------------------
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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message