more document

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@793 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.7
Xuefer 2005-10-20 03:27:03 +00:00
parent a9e314601e
commit 396a4de69b
2 changed files with 26 additions and 1 deletions

View File

@ -34,6 +34,8 @@ url.redirect
url.redirect = ( "^/show/([0-9]+)/([0-9]+)$" => "http://www.example.org/show.php?isdn=$1&page$2",
"^/get/([0-9]+)/([0-9]+)$" => "http://www.example.org/get.php?isdn=$1&page$2" )
# make a external redirect
# from any www.host (with www.) to the host (without www.)
$HTTP["host"] =~ "^www\.(.*)" {
url.redirect = ( "^/(.*)" => "http://%1/$1" )
}

View File

@ -52,6 +52,29 @@ query-string.::
url.rewrite-once = ( "^/id/([0-9]+)$" => "/index.php?id=$1",
"^/link/([a-zA-Z]+)" => "/index.php?link=$1" )
$HTTP["host"] =~ "^([^.]+)\.(this-is-mass-vhost\.com)" {
# 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/
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" )
}