/ Published in: Apache
Based on query string id force ssl.
If you want to do multiple pages, change id=login with id=(login|page|page2|pagen)
If you want to do multiple pages, change id=login with id=(login|page|page2|pagen)
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
RewriteEngine On RewriteCond %{QUERY_STRING} id=login RewriteCond %{SERVER_PORT} ^80$ RewriteRule ^(index.php|)$ https://www.yourdomain.co.uk/index.php [R=301,QSA,L] RewriteCond %{IS_SUBREQ} false RewriteCond %{SERVER_PORT} ^443$ RewriteCond %{QUERY_STRING} !(id=login) RewriteRule ^(index.php|)$ http://www.yourdomain.co.uk/index.php [R=301,QSA]