From 786287b684c0fafe6c852f3f230543e61e948875 Mon Sep 17 00:00:00 2001 From: joey Date: Thu, 10 May 2007 19:48:34 +0000 Subject: [PATCH] web commit by http://ressukka.net/: Add an example of redirecting with lighttpd --- doc/tips/redirections_for_usedirs.mdwn | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- 2.44.0