Search for Resources and Solutions

How to force url redirect from http to https with htaccess

From the begin i've redirected my demo from http to https because was important for login. With http the login didn't worked due to a security restriction(in config.php was https). But from version 0.0.7.8 this isn't required because Midrub redirects to correct login url format.

If you wan't to redirect anyway the Midrub frontend section from http to http please open htaccess with notepad and before any code, add the code below:



RewriteEngine On 
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.midrub.com/$1 [R,L]

Please be carreful with your htaccess, any space or wrong character will block your website.

Was this article helpful?