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?

2 Answers 2

2

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

order deny, allow
deny from all
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>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .