Apache “Under Construction” with exceptions
Do you want to restrict access to certain folders only ?
Usually you will put a .htaccess into your main dir if your site should not be accesible to the public. That’s how you can easily avoid that it will get indexed by search engine spiders for example.
You would do it like this:
AuthType Basic AuthName "Restricted Directory" AuthUserFile /path/to/my/.htusers Require valid-user
Then you just need a .htusers (google for htusers generator if you don’t know how to generate one) and people won’t be able to see your site content at all.
On the downside you can’t access any subdirectories! If you want to specify any exceptions simply put a .htaccess file into the folder and insert “Satisfy any” into it. Done! Now you can access the subdirectories but not the main directory.
Like our posts? Then subscribe via Mail:
Similar Posts:
- HTACCESS: Prevent Hotlinking by Referrer
- Hide Folder Directory
- Move Wordpress Blog To A New Host Or Domain
- Apache 403 Forbidden Linux – Solution
- Emergency Plan B – Wordpress Mass Attack
Socialize:
|
|











Leave your response!