The .htaccess file can restrict access to web browsers to specific things. I’ve written about this (on this blog) previously. However, here i talk about file types.
The snippets below are (or can be) the entire contents of the .htaccess file.
Prevent access to bash files that shouldn’t be in the root (document root):
<Files ~ "\.sh$"> Order deny,allow Deny from all </Files>
If you need to have bash scripts accessible via Apache, consider putting them in a directory perhaps called “/private” and we can then restrict that to the location:
Order allow,deny Deny from all Allow from 184.108.40.206