However, I want to stop forcing https for all pages. I thought this would be as easy as removing the first condition (RewriteCond %{HTTPS} !=on) and removing the S from the first rewrite rule. That didn't work and i'm stumped. Can someone show me how to modify these rules so they stop forcing https? I only want the https for certain pages, which i will control within those pages.
- Code: Select all
RewriteEngine on
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^emerson.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^casablanca.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^philipaustin.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^builders.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^credit.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^employment.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^catalog.metrolightingcenters.net$ [OR]
RewriteCond %{HTTP_HOST} ^registration.metrolightingcenters.net$
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
RewriteCond %{REQUEST_URI} !^/wildcard_host
RewriteCond %{HTTP_HOST} ^(www\.)?([a-z0-9-]+)\.metrolightingcenters\.net$ [NC]
RewriteCond %{DOCUMENT_ROOT}/wildcard_host/%2/ -d
RewriteRule ^(.*)$ wildcard_host/%2/$1 [L]
Thanks for your time,
-Jack