|
Partial HTTP to HTTPS rewrite and IRM redirect
Hi.
2 questions:
Objective:
I have 1 main .com domain with a SSL certificate- that I want to force all http requests to https for that domain (part I)
and
have the same main domain but .us site redirect to the .com site for any requests (part II)
Without forcing other IRMs that use the same .htaccess file to go to https since they do not have certificates and displays a user warning (if there is a way for IRMs to optionally use the same main domain certificate that would also be nice to know, or how to obtain IRM certificates);
I have tried to modify the previous .htaccess file to include this:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^MyDomain\.com [NC]
RewriteCond %{SERVER_PORT} 80
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
which seems to partially work for part I (and without forcing the IRMs to https)- although that only works for the main page mydomain.com - other web pages mydomain.com/page1.htm do not result in the https rewrite.
so the 2 Questions are:
1. How to get all the http .com pages to use https (through the htaccess file preferably), without affecting the http IRMs?
2. How do I also get the 1 IRM, the .us site (all pages) to redirect to the .com site in the same .htaccess file(?) through a redirect or rewrite?
Or is it better to have the .us site an IMO (same web content- will it use the SSL cert. of the .com? how change if so?)
Thanks,
|