Mar
19
Deny Access to inc Files Using htaccess
March 19, 2008 |
Sometimes, you may want to put database configuration information in an .inc file, so that you could include it in any PHP files when you need that commonly used, shared information. But if you point to the location of the .inc file in the browser bar and hit enter…oops! All your ‘top secrets’ are published! Don’t want people to see the deadly sensitive information in your inc files? Use the follow to display a 403 Forbidden error instead.
<Files ~ "\.inc$">
Order Allow,Deny
Deny from All
</Files>
Similar Posts
- Block IPs Using htaccess
- Block people from Certain URL Using htaccess
- Use htaccess to Deny Access Directory Listing
- Create Custom Error Pages Using htaccess PHP
- htaccess Explicitly Define Default Index File
- htaccess gzip for Faster Loading and Bandwidth Saving
- Use htaccess to Deny Access to hidden Files
- htaccess Deny Diractory Access During a Specific Time
- Force Files Like PDF Download using htaccess
- Apache htaccess Prevent Users from Uploading and Executing Files
- Use htaccess to Fake Different File Extension
- htaccess Permanently redirect file or directory
- Use htaccess with Site Maintenance Page
- htaccess Require the www For Domain URL
- htaccess Limit the Number of Concurrent Visitors to your Website
- htaccess Remove the www From Domain URL
- Remove File Extension Using htaccess
- Set Local Timezone Using htaccess
- Use htaccess for 404 Redirect
- Google Text Translation Using htaccess
- htaccess Conditional Loop Redirect


































