When you build applications, you may want to disallow some files from being opened. Such files you may want to hide are those with .inc and .sql extensions. You may want to hide those files since you do not them to be able to be read in a browser.
Although directories with index.php or index.html files will not allow someone to search for a directory list of files, someone could see the sensitive information if they tyled a url like http://example.com/databseconnect.inc. If databaseconnect.php was used, the data would not be visible.
The simple method to hide files using .htaccess is shown below.
Hide files with inc or sql extension:
<Files ~ \”\\.(inc|sql|…other_name_extensions…)$\”>
order allow,deny
deny from all
</Files>
© 2018 ALL Rights Reserved | Sitemap
Vancouver | North Vancouver | Burnaby | Richmond | Coquitlam | Port Coquitlam | Surrey | Langley | Maple Ridge | Mission | Abbotsford | Kamloops | Kelowna | Victoria | Squamish | Whistler | Pemberton