From: joey Date: Thu, 10 May 2007 19:48:34 +0000 (+0000) Subject: web commit by http://ressukka.net/: Add an example of redirecting with lighttpd X-Git-Tag: 2.1~47 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/786287b684c0fafe6c852f3f230543e61e948875 web commit by http://ressukka.net/: Add an example of redirecting with lighttpd --- 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