Tag: wordpress 3.0 rewrite

nginx 下的 wordpress 3.0 rewrite规则

wordpress 3.0已经出到beta2了,我是版本爱好者,所以早就升级到3.0了,并且也启用多站点功能,但由于我用的web环境是nginx,所以要更新下 wordpress 3.0 rewrite的规则,如下:
#on server block
##necessary if using a multi-site plugin
server_name_in_redirect off;
##necessary if running Nginx behind a reverse-proxy
port_in_redirect off;

rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*.php)$ $1 last;
rewrite ^ /index.php last;
}

已经测试通过了

猫言猫语 © 2007-2014 Frontier Theme