htaccess Secure Redirect

view story

http://serverfault.com – The goal is to have every page (minus one folder) of a site redirect to https. I've discovered the following does not do that. The one folder contains a subdomain. Let's call it mahogany.com. Edit: Modify rules RewriteEngine On RewriteBase / RewriteCond %{HTTPS} off RewriteCond %{HTTP_HOST} ^www.site1\.mobi [NC,OR] RewriteCond %{HTTP_HOST} ^site1\.mobi [NC,OR] RewriteCond %{HTTP_HOST} !^mahogany\.com [NC] RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] If someone types site1.mobi or www.site1.mobi into their browser, apache with the above in the document root htaccess will not (HowTos)