WordPress 3.0 network lighttpd rewrite rules
I recently installed my first WordPress network on lighttpd and was looking for rewrite rules. This post is correct except for the rewrite rule for files. I supposed it's a change that was introduced in 3.0, or maybe earlier. Anyway, here are updated rewrite rules:
In your lighttpd.conf:
$HTTP["host"] =~ "domain\.com" {
simple-vhost.default-host = "domain.com"
include "wpmu-rewrite.conf"
}
And wpmu-rewrite.conf:
url.rewrite-once = (
"^/(.*/)?files/$" => "/index.php",
"^/(.*/)?files/(.*)" => "/wp-includes/ms-files.php?file=$2",
"^(/wp-admin/.*)" => "$1",
"^/({_0}+/)?(wp-.*)" => "/$2",
"^/({_0}+/)?(.*\.php)$" => "/$2",
)
What's changed from the other site's example is the ms-files.php rewrite rule.
I am Nicolas Kuttler, a web developer, system administrator and IT consultant from France, currently living in Germany.





Hi Nicolas,
After rewrite it runs my application twice. Do you know why? And if it is a normal working of lighttpd could you tell me how can detect duplicate request by using environment variables?
Thank you,