• Purchasing a license grants permission to use the software and to get Tech Support. A license purchase doesn't grant customization support.

Force HTTPS

zalmoxis

New Member
Hello,

Forcing HTTPS via Chevereto's dashboard didn't seem to work (i.e no https happened). Forcing it via cPanel (Domains area, there's a toggle to Force HTTPS) didn't work either.

So I ended up modifying the .htaccess by adding this to the already existing file:

<IfModule mod_rewrite.c>

RewriteEngine On
RewriteBase /

RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^mger\.co$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mger\.co$
RewriteRule .* https://mger.co%{REQUEST_URI} [R=301,L]

RewriteCond %{HTTPS} =on
RewriteCond %{HTTP_HOST} ^www\.mger\.co$
RewriteRule .* https://mger.co%{REQUEST_URI} [R=301,L]

</IfModule>


It works perfectly now, but I wonder if this is going to break anything (i.e updates, as I've just had an issue previously or perhaps the integration with External Storage)?
 

HenrysCat

Core license
License owner
Seems like an odd way of doing it to me, but there are many different ways, this is all I use,
Code:
RewriteEngine On
    RewriteCond %{HTTPS} !=on
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
and no, doing this will not break anything.
 
Top