direct http to https on certain pages?

Posted by Elliott on Server Fault See other posts from Server Fault or by Elliott
Published on 2009-11-17T20:49:14Z Indexed on 2010/03/13 11:05 UTC
Read the original article Hit count: 305

Filed under:
|
|

Hi below is some code I added to my .htaccess code how can I add certain pages to be re-directed to https? such as login.php & login.html

also if the user types in www. they get a "untrusted connection" as the SSL is only valid without the www. how could I fix this?

Thanks

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteCond %{REQUEST_URI} /login.html
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

© Server Fault or respective owner

Related posts about https

Related posts about apache