Portal Home > Knowledgebase > Articles Database > .htaccess help
.htaccess help
Posted by Mark Muyskens, 03-03-2010, 01:48 PM |
Hey,
I am using the following htaccess to redirect specific pages to https;
RewriteEngine On
RewriteBase /
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /feedback_form_13.html [OR]
RewriteCond %{REQUEST_URI} /pay_now_38.html [OR]
RewriteCond %{REQUEST_URI} /pay_now_39.html
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L]
This works great, but when reaching one of these pages. It serves sequential pages all in https. How can I switch out of https if it is not one of the specified pages?
Thanks!
|
Posted by Lightwave, 03-03-2010, 02:38 PM |
Adding a secondary rule like this might work:
RewriteCond %{HTTPS} on
RewriteCond %{REQUEST_URI} !/feedback_form_13.html [OR]
RewriteCond %{REQUEST_URI} !/pay_now_38.html [OR]
RewriteCond %{REQUEST_URI} !/pay_now_39.html
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [L]
|
Posted by Mark Muyskens, 03-03-2010, 02:53 PM |
Thanks, that worked perfectly
|
Add to Favourites Print this Article
Also Read