1

I have an /uploads directory I wish to block from direct access. Of course I would put it outside the web root, but I'm really looking at a quick .htaccess fix.

Is there a way I can 403 or 404 a directory?

Benbob
  • 277
  • 1
  • 6
  • 19

2 Answers2

2

This will cause a 403 Forbidden message to be sent by the server:

order deny, allow
deny from all
jasonbar
  • 121
  • 3
2

This seems to work. I put the following in /uploads/.htaccess

<LIMIT GET POST>
order deny,allow
deny from all
allow from none
</LIMIT>
Benbob
  • 277
  • 1
  • 6
  • 19