ISAPI Force to SSL on single domain
2 posts
• Page 1 of 1
ISAPI Force to SSL on single domain
Hi, have multiple domains on server - but only want to force 1 domain from http to https:
##Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]
##Redirect non-HTTPS to HTTPS
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? https://%1%2 [R,L]
The above works for all domains - how do I determine just one?
##Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]
##Redirect non-HTTPS to HTTPS
RewriteCond %{HTTP:Host} (.*)
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? https://%1%2 [R,L]
The above works for all domains - how do I determine just one?
Re: ISAPI Force to SSL on single domain
Actually, think I've found the solution...
##Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]
##Redirect non-HTTPS to HTTPS
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? https://www.domain.com%1 [R,L]
##Fix missing trailing slash char on folders
RewriteRule ^([^.?]+[^.?/])$ $1/ [R,L]
##Redirect non-HTTPS to HTTPS
RewriteCond %{HTTP_HOST} ^www\.domain\.com$ [NC]
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} (.*)
RewriteRule .? https://www.domain.com%1 [R,L]
2 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 19 guests