Force redirect to HTTPS environment

Asked

Viewed 181 times

1

How to force redirect to the environment with HTTPS with HTACCESS? I need the code to be adapted to what I already have:

RewriteEngine On
RewriteCond %{SCRIPT_FILENAME} !-f
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1

1 answer

3


Try to insert these lines :

RewriteCond %{HTTPS} !=on
RewriteRule ^ HTTPS://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.