I'd like to redirect requests for certain urls to secure https with .htaccess rules. I found this excellent tutorial:
https://exp-resso.com/blog/post/2011/08/securing-your-expressionengine-website-with-https
Based on this, I can redirect everything in the "account" template group, my system folder and the admin.php file with the following:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond $1 ^(account|system|admin\.php) [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
This works perfectly. But now I'm trying to find out how to do the opposite, redirect other URLs to non-secure http. I don't want to hard code navigation with http URLs. I'd rather use {path=''} and {site_url} variables.
Also, ideally it would work so that I don't have to hard-code all my non-secure template groups and pages into the .htaccess file.
RewriteCond $1 ^(about|contact|calendar|unicorns|etc) [NC]
This would be too hard to maintain.