RE: Rewrite HTTP to HTTPS.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx] On Behalf Of Vinicius
> Sent: Saturday, January 13, 2007 9:24 AM
> To: users@xxxxxxxxxxxxxxxx
> Subject:  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@xxxxxxxxxxxxxxxx
>    "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
> For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


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



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux