from ssl page to non ssl page

Fix it!!

from ssl page to non ssl page

Postby markthien » Mon Sep 08, 2008 11:29 pm

Hi guys,

When user navigate to a secure page like and after that they click on a link which will go to However, the it's still a secure page. the index.jsp is not neccessary to be a secure page. how to rewrite this?

Thanks & Regards,
Mark Thien
Posts: 7
Joined: Mon Sep 08, 2008 11:28 pm
Location: Singapore

Postby richardk » Wed Sep 10, 2008 10:13 am

So only login.jsp should be secure? Try
Code: Select all
Options +FollowSymLinks

RewriteEngine On

# If it's HTTPS and not login.jsp, switch to HTTP.
RewriteCond %{SERVER_PORT} ^443$
RewriteRule !^login\.jsp$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

# If it's HTTP and login.php, switch to HTTPS.
RewriteCond %{SERVER_PORT} ^80$
RewriteRule ^login\.jsp$ http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am

Return to Security with Mod_Rewrite

Who is online

Users browsing this forum: No registered users and 2 guests