poniedziałek, 8 czerwca 2009

lighttpd rewrite rules for popular scripts

Few weeks ago I finally did:
emerge --unmerge apache

Illusion server has now only lighttpd as a web service. At the beginning we have some problems with rewrite rules for drupal, dokuwiki, wordpress and wordpress MU. But now, I think everything works great (dear users - any complains? :) ) Below, I would like to share a working rules for up to date of drupal (clean urls) and wordpress MU (permalink).

url.rewrite = ( "^/update\.php$" => "/update.php",
"^/update\.php\?(.*)$" => "/update.php?$1",
"^/(?!(misc|theme|module|site))([^?]*)\??(.*)$" => "/index.php?q=$2&$3" )
server.error-handler-404 = "/index.php"

url.rewrite-once = (
"^/blog/(.*)?/?files/$" => "/blog/index.php",
"^/blog/(.*)?/?files/(.*)" => "/blog/wp-content/blogs.php?file=$2",
"^/blog/(wp-.*)$" => "/blog/$1",
"^/blog/([_0-9a-zA-Z-]+/)?(wp-.*)" => "/blog/$2",
"^/blog/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "/blog/$2",
"^/blog/(\?.*)$" => "/blog/index.php$1",
"^/blog/." => "/blog/index.php"

0 komentarze: