0

I'm trying to rewrite using htaccess all traffic over SSL (https). However my certificate gives an error on mobile, so I Want mobile traffic to go over the normal http protocol.

This is my htaccess:

<IfModule mod_rewrite.c>
    #Options +FollowSymlinks
  # Options +SymLinksIfOwnerMatch
    RewriteEngine On
  # RewriteBase /
</IfModule>
<IfModule mod_rewrite.c>
    RewriteCond %{HTTPS} !=on
    RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
    RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
</IfModule>
 <IfModule mod_rewrite.c>
    RewriteCond %{SERVER_PORT} !^443
    RewriteRule ^ https://ugaris.com%{REQUEST_URI} [R=301,L]
    RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
    RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
 </IfModule>

Just to be clear:

mobile -> http rest -> https all -> non-www

0 Answers0