LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Differences

This shows you the differences between the selected revision and the current version of the page.

litespeed:wiki:feature:internal_redirect 2012/10/22 13:20 litespeed:wiki:feature:internal_redirect 2012/10/22 13:28 current
Line 13: Line 13:
The end user is not aware of this internal redirection and the data returns appears from the original url. The end user is not aware of this internal redirection and the data returns appears from the original url.
 +
Line 54: Line 55:
=== Protecting file from direct access === === Protecting file from direct access ===
-If you want to prevent user from access the file directly, just use a hard to guess URL like "/you_never_know/where_file_is_stored/...", or you can use a rewrite rule to deny direct access to the directory holding the files, something like +If you want to prevent user from access the file directly, just use a hard to guess URL like "/you_never_know/where_file_is_stored/...", or you can use a rewrite rule (in httpd.conf) to deny direct access to the directory holding the files, something like
  RewriteCond %{ORG_REQ_URI} ^/blocked/uri/   RewriteCond %{ORG_REQ_URI} ^/blocked/uri/
  RewriteRule ^/blocked/uri/ - [R=403,F]   RewriteRule ^/blocked/uri/ - [R=403,F]
 +
 +Here is a version in .htaccess (notice the difference between ^/blocked... and ^blocked...)
 +
 +  RewriteCond %{ORG_REQ_URI} ^/blocked/uri/
 +  RewriteRule ^blocked/uri/ - [R=403,F]
%{ORG_REQ_URI} is a LiteSpeed specific rewrite variable, which refers to the URI in the original request header. %{ORG_REQ_URI} is a LiteSpeed specific rewrite variable, which refers to the URI in the original request header.
 
litespeed/wiki/feature/internal_redirect.txt · Last modified: 2012/10/22 13:28 by webizen
 
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.