You can use:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^((?!(cron|mailer_confirmjob|mailer_followup|cron_duplicate_check|mailer_periodicfollowup)\.php).*)$ https://%{HTTP_HOST}%{REQUEST_URI} [NC,L,R]
Question
I need to rewrite all pages and assets to https, with exceptions for a couple specific pages. Here's my current htaccess code, which works fine for the broad https rewrite. I just need to figure out how to add page-specific exceptions to this.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
The pages I want to exclude are as follows:
Thanks!
Solution
You can use:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^((?!(cron|mailer_confirmjob|mailer_followup|cron_duplicate_check|mailer_periodicfollowup)\.php).*)$ https://%{HTTP_HOST}%{REQUEST_URI} [NC,L,R]