Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
01-17-2009, 02:48 PM #1
- Join Date
- May 2006
- Thanked 0 Times in 0 Posts
htaccess, directory deny except images
I'm not finding any websites that talk about using htaccess to deny all access to a directory (and below) unless it's an image file. Here's my best attempt:
Allow from all
Deny from all
I have all of my back end php functionality in the admins/ folder. I want to deny everybody from calling those files directly through a browser to make it more secure. Those php files need to be ok to be included in the front end functionality which doesn't seem to be a problem. But, my admin images are in that directory as well (moving them out would be a nightmare). So, I'm finding that when I deny access to the directory, the browser can no longer display images from that directory either.
So, I was thinking deny all access to folders and files unless it's an image file. Is there a way to do that exception?