httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Arnold <carn...@electrichendrix.com>
Subject [users@httpd] Redirect http to https
Date Wed, 28 Jan 2015 21:55:09 GMT
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.<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?

Mime
View raw message