wordpress在nginx下的rewrite规则

wordpress在nginx下的rewrite规则
修改配置文件,其实和apache的差不多,就是有一点点小小的差别

[ccn lang="bash" tab_size="4" theme="blackboard" width="800" ]
server {
listen 80;
server_name www.wcv5.com;

access_log /var/log/nginx/www.wcv5.com.access_log main;
error_log /var/log/nginx/www.wcv5.com.error_log info;

root /app/www/wcv5.com/htdocs/wcwp;

location / {
index index.html index.htm index.php;
if (-f $request_filename/index.html){
rewrite (.*) $1/index.html break;
}
if (-f $request_filename/index.php){
rewrite (.*) $1/index.php;
}
if (!-f $request_filename){
rewrite (.*) /index.php;
}
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass 127.0.0.1:12280;
}
}
[/ccn]