apache2换为lighttpd后,wordpress固定链接失效问题
2012 年 6 月 29 日 apache2换为lighttpd后,wordpress固定链接失效问题无评论
apache换成lighttpd后,固定链接出现错误。解决方法是修改/etc/lighttpd/lighttpd.conf文件
去掉"mod_rewrite",前边的#
然后加入如下形式内容
$HTTP["host"]=="www.xdty.org"{
server.document-root="/var/www/wordpress"
url.rewrite-final = (
"^/(audio|music|photo|novel|musicbox|c|mp3|test|wap|wiki|code)/(.*)" => "$0",
"^/(.*)?/?files/$" => "index.php",
"^/(.*)?/?files/(.*)" => "wp-content/blogs.php?file=$2",
"^/(wp-.*)$" => "$1",
"^/([_0-9a-zA-Z-]+/)?(wp-.*)" => "$2",
"^/([_0-9a-zA-Z-]+/)?(.*\.php)$" => "$2",
"(\?.*)$" => "index.php$1",
"." => "index.php",
)
}
重启服务即可
发表评论