diff options
author | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-29 17:53:00 +0000 |
---|---|---|
committer | MCApollo <34170230+MCApollo@users.noreply.github.com> | 2019-04-29 17:53:00 +0000 |
commit | 59f5fd20e2f59ae186d5a461aef7782dd55e4e7b (patch) | |
tree | 10475faf0b6dcb812b64da679f4ae8ff01c45874 /data/lighttpd/lighttpd-1.4.53/doc/outdated/rewrite.txt | |
parent | f06e297cd175cca39745f6d1970225ae88aa68f1 (diff) |
Updated lighttpd.
Diffstat (limited to 'data/lighttpd/lighttpd-1.4.53/doc/outdated/rewrite.txt')
-rw-r--r-- | data/lighttpd/lighttpd-1.4.53/doc/outdated/rewrite.txt | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/data/lighttpd/lighttpd-1.4.53/doc/outdated/rewrite.txt b/data/lighttpd/lighttpd-1.4.53/doc/outdated/rewrite.txt new file mode 100644 index 000000000..a13906957 --- /dev/null +++ b/data/lighttpd/lighttpd-1.4.53/doc/outdated/rewrite.txt @@ -0,0 +1,77 @@ +============ +URL Rewrites +============ + +------------------- +Module: mod_rewrite +------------------- + +:Author: Jan Kneschke +:Date: $Date: 2004/11/03 22:26:05 $ +:Revision: $Revision: 1.2 $ + +:abstract: + url rewrite + +.. meta:: + :keywords: lighttpd, rewrite + +.. contents:: Table of Contents + +Description +=========== + +internal redirects, url rewrite + +Options +======= + +url.rewrite-once + rewrites a set of URLs interally in the webserver BEFORE they are handled. + + e.g. :: + + url.rewrite-once = ( "<regex>" => "<relative-uri>" ) + +url.rewrite-repeat + rewrites a set of URLs interally in the webserver BEFORE they are handled + + e.g. :: + + url.rewrite-repeat = ( "<regex>" => "<relative-uri>" ) + +The options ``url.rewrite`` and ``url.rewrite-final`` were mapped to ``url.rewrite-once`` +in 1.3.16. + +Warning +======= + +Do NOT use mod_rewrite to protect specific urls, as the original url passed from the client +is matched against your rules, for example strings like "/abc/../xyz%2f/path". + +Examples +======== + +The regex is matching the full REQUEST_URI which is supplied by the user including +query-string.:: + + url.rewrite-once = ( "^/id/([0-9]+)$" => "/index.php?id=$1", + "^/link/([a-zA-Z]+)" => "/index.php?link=$1" ) + + + + # the following example, is, however just simulating vhost by rewrite + # * you can never change document-root by mod_rewrite + # use mod_*host instead to make real mass-vhost + + # request: http://any.domain.com/url/ + # before rewrite: REQUEST_URI="/www/htdocs/url/" + # and DOCUMENT_ROOT="/www/htdocs/" %0="www.domain.com" $1="url/" + # after rewrite: REQUEST_URI="/www/htdocs/domain.com/url/" + # still, you have DOCUMENT_ROOT=/www/htdocs/ + + server.document-root = "/www/htdocs/" + $HTTP["host"] =~ "^.*\.([^.]+\.com)$" { + url.rewrite-once = ( "^/(.*)" => "/%0/$1" ) + } + |