Make sure you put these in the correct VHOST. They need to be in the :80
vhost, not the :443 vhost.

I usually use the Redirect directive (
http://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirect) instead.

- Y

On Wed, Jan 28, 2015 at 4:55 PM, Chris Arnold <carn...@electrichendrix.com>
wrote:

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

Reply via email to