httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary W. Smith" <g...@primeexalia.com>
Subject RE: [users@httpd] Rewrite HTTP to HTTPS.
Date Sat, 13 Jan 2007 17:31:46 GMT
This works for us.  We don't use virtual hosts but if we put a general
rewrite rule it always re-wrote the https one as well and caused a loop.

In redhat we put this in /etc/httpd/conf.d/redirect.conf.  You could
also append this to the end of your httpd.conf file (wherever it is)

<virtualhost *:80> 
servername www.yourname.com
serveralias *
RewriteEngine on 
RewriteRule ^.*$ https://www.yourname.com/ [R,L] 
</virtualhost>


**** Alternatively you can do this to redirect the users to a subdir
(which is really what we do ****
<virtualhost *:80> 
servername www.yourname.com
serveralias *
RewriteEngine on 
RewriteRule ^.*$ https://www.yourname.com/horde/imp [R,L] 
</virtualhost>

Hope that helps.


> -----Original Message-----
> From: news [mailto:news@sea.gmane.org] On Behalf Of Vinicius
> Sent: Saturday, January 13, 2007 9:24 AM
> To: users@httpd.apache.org
> Subject: [users@httpd] Rewrite HTTP to HTTPS.
> 
> Hello,
> 
> First, excuse-me to ask the below question again (I suppose one was
> answered several times in the past).
> 
> Second, the question: I am using opensuse 10.2, where I put a rewrite
> rule to change the URL http://myserver/<etc> to
https://myserver/<etc>,
> please?
> 
> <etc> = the remaining address
> 
> 
> TIA, Vinicius.
> 
> P.S.: I have search Google and this mailing this, but no success.
> 
> 
> ---------------------------------------------------------------------
> 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


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