restrict access to everything except specified page(s) using .htaccess
I tend to upload 'work in progress' to subdomains of my site and use an htaccess file in the folder root to restrict access.
My client has a 'holding page' and wants me to transfer the site files to his server so he can work on the cms content, and then all i need to do is remove the htaccess restriction at go live.
my htaccess file to restrict all access is pretty simple,
# password-protect the directory in which this htaccess rule resides
AuthType basic
AuthName "This directory is protected"
AuthUserFile /path/to/password/file/
AuthGroupFile /dev/null
Require valid-user
How can i restrict access to everything except, say, index.html, so visitors can still access the landing page only ?
I googled a few 'solutions' to this, but none have worked.
As I can restrict access generally, I know the server is set up ok and the password file is in the right place,