httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beau Hebert" <bheb...@c-quential.com>
Subject [users@httpd] mod_rewrite help
Date Wed, 21 May 2003 15:08:26 GMT
First, a big thanks to all out in Apacheland for helping me rewrite
incoming http requests to https. It works like a charm. But, as usual,
one success has led to another obstacle. 

As mentioned, all incoming HTTP requests are rewritten to HTTPS using
mod_rewrite with the following code (thanks again Jurgen):

RewriteEngine On
RewriteRule ^(.*)$ https://www.mydomain.com$1

As a consequence to having all requests being HTTPS I also need to have
all incoming requests contain www (i.e.
https://www.mydomain.com/login.php  rather than simply
https://mydomain.com/login.php), otherwise the user receives an alert
that the name on the Certificate doesn't match the website. This is
because the Secure Certificate is registered to the fully qualified
domain. So, my question: is there a way (either augmenting the code
above or including new code) so that if someone were to type
http://mydomnain.com/anypage.jsp, it would be rewritten to
https://www.mydomain.com/anypage.jsp. 

Thanks.
Beau 



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