diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-05-10 19:48:34 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-05-10 19:48:34 +0000 |
commit | 786287b684c0fafe6c852f3f230543e61e948875 (patch) | |
tree | dbeb58ed51e06ae452ada3f7fdbf3554f818f412 /doc | |
parent | 3eb541e36acc858bd086354b470fc1deef05bbdc (diff) |
web commit by http://ressukka.net/: Add an example of redirecting with lighttpd
Diffstat (limited to 'doc')
-rw-r--r-- | doc/tips/redirections_for_usedirs.mdwn | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/tips/redirections_for_usedirs.mdwn b/doc/tips/redirections_for_usedirs.mdwn index 51a73a7ad..2913691f0 100644 --- a/doc/tips/redirections_for_usedirs.mdwn +++ b/doc/tips/redirections_for_usedirs.mdwn @@ -20,3 +20,14 @@ be adapted to other situations. RewriteCond $1 !^/~ RewriteCond $1 !.*/index$ RewriteRule (.+).atom$ $1/index.atom + +The following example is exactly the same thing written for lighttpd by using mod_redirect: + + $HTTP["url"] !~ "^/(~|doc/|ajaxterm|cgi-bin/)" { + $HTTP["url"] !~ "^/(.*/index\.(html|rss|atom))" { + url.redirect = ( + "(.*)\.html$" => "$1/", + "(.*)\.(atom|rss)$" => "$1/index.$2" + ) + } + }
\ No newline at end of file |