Friday, April 2, 2010

.htaccess : Deny access to anything in a subfolder except php fopen

This can be very handy if you want to serve media files or special dowmloeds but only through a php proxy script.

RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+)/.*\ HTTP [NC]
RewriteRule .* - [F,L

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home