Thread: sendfile
View Single Post
  #4  
Old 03-12-2007, 09:50 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
To block direct access to a directory, just add a rewrite rule at vhost level like

RewriteCond %{REQUEST_URI} ^/blocked/uri/
RewriteRule ^/blocked/uri/ - [R=403,F]

REQUEST_URI is the same as the current URI when accessing the file directly, however, when a request was internally redirected, Current URI is the "/blocked/uri/", while REQUEST_URI is the URI in the original request header.
Reply With Quote