Lighttpd wordpress Permalink rewrite 办法
出自Guoshuang Wiki
url.rewrite-once = ( "^/(wp-.+).*/?" => "$0", "^/(sitemap.xml)" => "$0", "^/(xmlrpc.php)" => "$0", "^/keyword/([A-Za-z_0-9\-]+)/?$" => "/index.php?keyword=$1", "^/.*?(\?.*)?$" => "/index.php$1" )
或者
创建 /etc/lighttpd/wp-rewrite.conf 文件,内容为
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"
)
然后修改 /etc/lighttpd/lighttpd.conf
$HTTP["host"] =~ "blog\.nix\.is" {
var.wpdir = "/"
include "wp-rewrite.conf"
}
注意:$HTTP["host"] =~ "blog\.nix\.is" 要和你自己的情况一致。
