less confusing/misleading on conditional backreference
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@955 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
parent
74515e64d2
commit
1d97323652
|
@ -53,28 +53,19 @@ query-string.::
|
|||
"^/link/([a-zA-Z]+)" => "/index.php?link=$1" )
|
||||
|
||||
|
||||
# request: http://www.domain.com/url/
|
||||
# or request: http://any.domain.com/url/
|
||||
# before write: /www/htdocs/url/
|
||||
# after rewrite: /www/htdocs/domain.com/url/
|
||||
# document-root=/www/htdocs/ %0=www.domain.com $1=url/
|
||||
|
||||
# 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" )
|
||||
}
|
||||
|
||||
|
||||
# request: http://abc.mass-serve-subdomain.com/url/
|
||||
# before rewrite: /www/htdocs/url/
|
||||
# after rewrite: /www/htdocs/mass-serve-subdomain.com/abc/url/
|
||||
$HTTP["host"] =~ "^([^.]+)\.mass-subdomain\.com" {
|
||||
server.document-root = "/www/htdocs/mass-subdomain.com"
|
||||
url.rewrite-once = ( "^/(.*)" => "/%1/$1" )
|
||||
}
|
||||
|
||||
|
||||
# similar effect as above, except that you have multiply mass-subdomain now
|
||||
server.document-root = "/www/htdocs/"
|
||||
$HTTP["host"] =~ "^([^.]+)\.(mass-subdomain\.com|mass-subdomain\.net)" {
|
||||
url.rewrite-once = ( "^/(.*)" => "/%2/%1/$1" )
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue