httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthew England <mengl...@mengland.net>
Subject [users@httpd] Redirection http: to https: & truncating "www." prefix
Date Mon, 11 Oct 2004 04:02:01 GMT
Hello,

I am attempting to redirect all http (port 80) access to my server to https 
(SSL on port 443).  I've added this to my httpd.conf and it seems to 
work.  Can this group verify this will be correct for all my 
situations/scenarios?

<VirtualHost *:443>
     ServerName example.com
</VirtualHost>

<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
Redirect permanent / https://example.com/
</VirtualHost>


I also want to truncate the "www." prefix on the https access (as I think I 
have done in the http access) with the following, additional lines:

<VirtualHost *:443>
     ServerName www.example.com
     Redirect permanent / https://example.com/
</VirtualHost>

However, this does not appear to work.  Any pointers/recommendations?

My apologies if this is a faq.

-Matt


---------------------------------------------------------------------
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