exemplo de htaccess:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^en/contact$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{HTTPS} =on
RewriteRule !^en/contact$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
http://domain/en/contact
redireciona para https://domain/en/contact
reescrita para index.php? q = en / contact
http://domain/en/fo
reescrever para index.php? q = en / fo
https://domain/en/fo
redireciona para http://domain/en/fo
reescrita para index.php? q = en / fo
https://domain/en/contact
reescrever para index.php? q = en / contact