lighttpd rewrite rules for wordpress
I found this very informative post about lighttpd mod-rewrites for Wordpress, written by Hinrik Örn Sigurðsson.
Create a file called wp-rewrite.conf in your lighttpd config folder:
url.rewrite-once = ( "^" + wpdir + "(wp-.+).*/?" => "$0", "^" + wpdir + "(sitemap.xml)" => "$0", "^" + wpdir + "(xmlrpc.php)" => "$0", "^" + wpdir + "keyword/([A-Za-z_0-9-])/?$" => wpdir + "index.php?keyword=$1", "^" + wpdir + "(.+)/?$" => wpdir + "index.php/$1" )
Then include the above file in the $HTTP["host'] section of the specific domain’s config file:
$HTTP["host"] =~ "mydomain.com" { var.wpdir = "/" include "wp-rewrite.conf" }
Just make sure that you remove any existing rules in .htaccess, that caused some problems on my side.
