Forum Moderators: phranque
anyway..
im trying to switch my browser to https before it asks for the login infomation.
the code im using is:
DirectoryIndex login.php
RewriteEngine On
RewriteCond %{SERVER_PORT}!443
RewriteRule ^(.*)?$ [website.com...] [L,R]
<Limit GET POST>
order deny,allow
deny from all
allow from all
require valid-user
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName "Forbidden"
AuthType Basic
AuthUserFile /path/to/my/files/
Require valid-user
Thankyou.
Steve.
A simple fix is to make sure that all links to the authentication directory use "https://example.com/logindir/login.html" instead of "http://example.com/login_dir/login.html". I'm referring to the directory used for the "login" page, not necessarily the directory where the password-protected stuff is stored. You could, for example, put the protected content below "logindir" and redirect non-https requests back to the login page if an "already-authorized" cookie is not sent with the request. There are many ways to do this, and this is just one, but it can work for .htaccess-privilege-only accounts.
Jim