{comm_author} 在 {comm_posttime} 说:
{comm_content}
让wordpress支持伪静态的两种写法:
location / {
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 / {
if (!-e $request_filename) {
rewrite ^/(index|atom|rsd)\.xml$ http://www.your-web-url.com last;
rewrite ^([_0-9a-zA-Z-] )?(/wp-.*) $2 last;
rewrite ^([_0-9a-zA-Z-] )?(/.*\.php)$ $2 last;
rewrite ^ /index.php last;
}
}