1 AuthUserFile /home/auth/secure_html/dev_testhtpasswd/.htpasswd
2 AuthGroupFile /dev/null
3 AuthName "Where's the cake?"
5 ErrorDocument 404 /index.php
10 # This will enable the Rewrite capabilities
12 RewriteCond %{HTTPS} !=on
13 # This checks to make sure the connection is not already HTTPS
15 RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
16 # This rule will redirect users from their original location, to the same location but using HTTPS.
17 # i.e. http://www.example.com/foo/ to https://www.example.com/foo/
18 # The leading slash is made optional so that this will work either in httpd.conf
19 # or .htaccess context