tags:

views:

47

answers:

1

Hi I have added the below code to .ht access but how can I add another page to this? such as login.php

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}
+1  A: 

Your first question doesn't really give the required information to write the rewrite rule. Upon what criteria do you want to redirect them to login.php?

As far as the SSL issue;

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

RewriteCond %{HTTPS} != on
RewriteRule ^(.*)$ https://$1 [L]
Dustin Hansen
the login form is login.html....this is processed through login.php , so if the user types http is should be changed to https
Elliott
Also the code above I either get internal server error, or untrusted connection
Elliott