I'm working on a web site on a shared hosting server (Apache 1.3.37), so I don't have direct control over Apache and can only use .htaccess files to get the job done.
For a folder containing sensitive info, I want it to first redirect to SHTTP (if connecting by regular http), THEN require a password, in that order.
Instead, it's first sending out the auth request over the unencrypted plain, receiving the password over the plain, THEN switching to https after authorizing the user. (Then, it starts the auth process over again for the HTTPS connection.) Clearly, this isn't good!
(This behavior was verified with a TCP packet sniffer.)
Following is from the .htaccess file I made:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*)
AuthUserFile <path>
AuthName "Protected"
AuthType Basic
<Limit GET POST PUT>
require valid-user
</Limit>
Both individual blocks work. I just need them to work in the correct order.
Anyone have any ideas how I can accomplish this?
Thanks!
For a folder containing sensitive info, I want it to first redirect to SHTTP (if connecting by regular http), THEN require a password, in that order.
Instead, it's first sending out the auth request over the unencrypted plain, receiving the password over the plain, THEN switching to https after authorizing the user. (Then, it starts the auth process over again for the HTTPS connection.) Clearly, this isn't good!
(This behavior was verified with a TCP packet sniffer.)
Following is from the .htaccess file I made:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule (.*)
AuthUserFile <path>
AuthName "Protected"
AuthType Basic
<Limit GET POST PUT>
require valid-user
</Limit>
Both individual blocks work. I just need them to work in the correct order.
Anyone have any ideas how I can accomplish this?
Thanks!