Is it possible to use .htaccess to protect an entire site, other than the index.html landing page?
The password protection side of things is easy.
Have been searching for ages, and the closest I've come up with is add the following afterwards:
<Files index.html>
satisfy any
</Files>
While this works if someone visits http://www.example.com/index.html, it doesn't work if they visit http://www.example.com, even if I add DirectoryIndex index.html. Removing the password protection side of things takes them to index.html, but with it in it asks for a password when I just enter the domain name.
Have tried things like using rewrite rules to rewrite ^/$ to index.html or a subdirectory containing the landing page -开发者_开发技巧 but those don't work since it seems the authentication is done before any rewrites.
Is this even possible?
Seems nobody here knew the answer, but I managed to get a solution from someone else:
<Files .>
satisfy any
</Files>
精彩评论