|
I've got an .htaccess file, and everything works except the redirection to HTTPS. If I remove everything else, that part works, but when it's all there together, it fails.
Thanks in advance for any help you can offer!
# require a password
AuthUserFile /blah/blah/blah/.htpasswd
AuthGroupFile /dev/null
AuthName Locked_Down
AuthType Basic
<Limit GET>
require valid-user
order deny,allow
# allow from office network:
allow from x.y.z
# allow from my home office IP:
allow from a.b.c.d
# deny from everyone else:
deny from all
</Limit>
# force HTTPS
# this worked in tests in isolation, but not here:
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R,L]
RewriteEngine Off
_________________ --
"The programmer, like the poet, works only slightly removed from pure thought-stuff. He builds his castles in the air, from air, creating by exertion of the imagination."
-- Fred Brooks
|