I seem to have run into a situation where .htaccess files were able to successfully shut down a website of mine by denying server side PHP access to everything but the loading widget. Is there a way to prevent users from sniffing around the directories of the site (ie finding includes, images directory etc) while allowing scripts on the server to still access them properly? If so, how would I go about doing that?
I have attempted following another stackoverflow question
order deny,allow
deny from all
allow from 127.0.0.1
but it also produces the same issue. For example, if the .htaccess file in /img/ contains those lines (and only those lines), then the images on pages will not load.