12月 25, 2010

lighttpd rewrite rule for wordpress 3

新版的 Wordpress 3 架構,讓原有的 rewrite rule 無法正常運作。所以要改成下列:
$HTTP["host"] == "www.site.com" {
url.rewrite-final = (

# Exclude some directories from rewriting
"^/(wp-admin|wp-includes|wp-content|gallery2)/(.*)" => "$0",

# Exclude .php files at root from rewriting
"^/(.*.php)" => "$0",
"^/sitemap.xml" => "$0" ,

# Handle permalinks and feeds
"^/(.*)$" => "/index.php/$1"
)
}

沒有留言:

張貼留言