I have a new website I’m working on that the client wants to keep a secret, but at the same time, I want to put an under construction page with some info on it. I would like to have everything except index.html require a user/password–index.html would be available to everyone.
I have the following, but I’m not sure what I need to add:
AuthName 'Restricted Area' AuthType Basic AuthUserFile /path/to/file/.htpasswd AuthGroupFile /dev/null require valid-user
There are too many files and possibly new files to say ‘for this set of files require a user/password’.
I think it has something to do with something similar to:
<Files index.html> order deny,allow allow from all </Files>
But I’m not exactly sure how.
1 Answer