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:[EMAIL PROTECTED] On Behalf Of Vinicius
> Sent: Saturday, January 13, 2007 9:24 AM
> To: users@httpd.apache.org
> Subject: [EMAIL PROTECTED] 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: [EMAIL PROTECTED]
>    "   from the digest: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
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: [EMAIL PROTECTED]
   "   from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to