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 |
| | | | |
| | 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. |
| | + | |
| | | | |
| | | | |
| | === 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. |