Jump to content

mod_rewrite rule for HTTP to HTTPS


mummana

Recommended Posts

Hi,

 

I am using the below configurations to redirect from HTTP to HTTPS login page.

It redirects http://test.com to https://test.com/home/login.jsp.

 

But when I request as https://test.com/, it is not redirecting to the login page.

 

==========================================================

RewriteCond %{HTTP_HOST} test.com [NC]

RewriteCond %{HTTPS} !on

RewriteRule .* https://test.com/home/login.jsp [R=301,L]

 

==========================================================

Could you please help me regarding.

 

Thanks

Srini

Link to comment
https://forums.phpfreaks.com/topic/138053-mod_rewrite-rule-for-http-to-https/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.