Hi, We want to redirect all page over HTTPS in the site. 1.) It works fine when we requet with http://mysite.com, it redirects to https://mysite.com/home/login.jsp. RewriteCond %{HTTP_HOST} mysite.com [NC] RewriteCond %{HTTPS} !on RewriteRule .* https://mysite.com/home/login.jsp [R=301] 2.) The issue is, when we request with https://mysite.com it not redirecting to https://mysite.com/home/login.jsp and it is hanging the request. Could you please help me here. Thanks
RewriteEngine On RewriteCond %{HTTP_HOST} !^support\.tolranet\.com [NC,OR] RewriteCond %{SERVER_PORT} 80 RewriteRule (.*) https://support.tolranet.com/$1 [R=301,L] Code (markup): That's what we use for our support site, you'll need to change the domain to be yours obviously.
Hi Tolra, thanks for the quick reply. It works fine, when we request with http port ( server_prot will be 80). Issue is when we request using https://mysite.com,it is not redirecting to the https://mysite.com/home/login.jsp (server_port will be 443) Could you please help me for the issue..
Sorry, I got called away when answering you, note to self start from scratch when you get back. Try the following, it should redirect on an empty request as well: RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.mysite\.com [NC,OR] RewriteCond %{SERVER_PORT} 80 [OR] RewriteCond %{REQUEST_URI} ^/$ RewriteRule (.*) https://www.mysite.com/home/login.jsp [R=301,L] Code (markup):