Mar
22
Use htaccess to Deny Access to hidden Files
March 22, 2008 |
Filenames beginning with a dot, or dot-files are considered “hidden” by UNIX. Usually, you don’t want to serve those to visitors to your website. Dreamhost already disallows retrieving ‘.htaccess’ and ‘.htpassword’, but you can recursively deny all access to all hidden files by placing into a top-level .htaccess:
RedirectMatch 403 /\..*$
This is useful when, e.g. your website is a Subversion “working copy.”
Similar Posts
- Deny Access to inc Files Using htaccess
- htaccess Deny Diractory Access During a Specific Time
- Block IPs Using htaccess
- Use htaccess to Deny Access Directory Listing
- htaccess Limit the Number of Concurrent Visitors to your Website
- Force Files Like PDF Download using htaccess
- Block people from Certain URL Using htaccess
- Apache htaccess Prevent Users from Uploading and Executing Files
- htaccess Explicitly Define Default Index File
- Use htaccess for 404 Redirect
- Use htaccess to Fake Different File Extension
- htaccess Remove the www From Domain URL
- Use htaccess with Site Maintenance Page
- htaccess Permanently redirect file or directory
- Google Text Translation Using htaccess
- htaccess gzip for Faster Loading and Bandwidth Saving
- Remove File Extension Using htaccess
- Create Custom Error Pages Using htaccess PHP
- Set Local Timezone Using htaccess
- htaccess Require the www For Domain URL
- htaccess Conditional Loop Redirect


































