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 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 ^(.*)$$1 [R,L]

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

Was this article helpful?