1. WordPress Mu后台开启永久链接功能

1
后台-设置-永久链接-自定义结构-/blog/archives/%post_id%

2. 修改Nginx.conf,加入rewrite rules

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
location / {
index index.html index.htm index.php;
root /data0/data_www/hangyan.com/wp;
#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-content/blogs.php?file=$1;
if (!-e $request_filename) {
rewrite ^.+?(/wp-.*) $1 last;
rewrite ^.+?(/.*\.php)$ $1 last;
rewrite ^ /index.php last;
}
}
Trackback

no comment untill now

Add your comment now