I have read a lot about this, but i still can't figure it out for my case. I am trying to force all http requests to go to https except for 2 pages. Those 2 pages requests have parameters passed to them. Here is the code i am using currently:
# Force go to https if user isn't asking for a url that has 'register_user.php' or 'register-customer' inside the url:
RewriteCond %{SERVER_PORT} 80
RewriteCond %{REQUEST_URI} !^/register_user.php$ [OR]
RewriteCond %{REQUEST_URI} !^/register-customer$ [NC]
RewriteRule ^(.*)$ https://www.myWebsite.com/main-folder/$1 [R,L]
# Force go to http if user is asking for a url that has 'register_user.php' or 'register-customer' inside the url:
RewriteCond %{SERVER_PORT} !80
RewriteCond %{REQUEST_URI} ^/register_user.php$ [OR]
RewriteCond %{REQUEST_URI} !^/register-customer$ [NC]
RewriteRule ^(.*)$ http://www.myWebsite.com/main-folder/$1 [R,L]
This code doesn't do the required job. Is there something wrong with it?