Redirect http to https

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

 



Apache 2.4.10 on SLES 12. I am trying to redirect port 80 requests to 443 so that http://share.domain.tld results in https://share.domain.tld. Here is what i have tried in the vhost file:


RewriteEngine On
#Redirect share.domain.tld port 80 requests to SSL
RewriteCond %{HTTPS} !=on
RewriteRule ^/share(.*) https://share.domain.tld/share/ [R=301,L]


I also tried:


RewriteEngine On
#Redirect share.domain.tld port 80 requests to SSL
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://share.domain/share/ [R=301,L]

(This redirects every request to https://share.domain.tld/share


Any hints or pointers on making this work?


[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