summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormOo <moo.lighttpd@gmail.com>2005-10-20 03:27:03 +0000
committermOo <moo.lighttpd@gmail.com>2005-10-20 03:27:03 +0000
commit396a4de69b49ceca35a3f132227d5c652732ba58 (patch)
tree8b5520c303f4937464c3845a06f0ccd86eea0c0f
parenta9e314601ee699375e69f2f2892735d630b5c9d3 (diff)
downloadlighttpd-git-396a4de69b49ceca35a3f132227d5c652732ba58.tar.gz
more document
git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-merge-1.4.x@793 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--doc/redirect.txt2
-rw-r--r--doc/rewrite.txt25
2 files changed, 26 insertions, 1 deletions
diff --git a/doc/redirect.txt b/doc/redirect.txt
index eea05d29..118ea8eb 100644
--- a/doc/redirect.txt
+++ b/doc/redirect.txt
@@ -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" )
}
diff --git a/doc/rewrite.txt b/doc/rewrite.txt
index d5277ff4..aed31c61 100644
--- a/doc/rewrite.txt
+++ b/doc/rewrite.txt
@@ -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" )
}