把如下这段代码放进server {…}节中即可实现
location / {
# This is cool because no php is touched for static content.
# include the "?$args" part so non-default permalinks doesn't
# break when using query string
try_files $uri $uri/ /index.php?$args;
}
温馨提示:此文件一般在(以CentOS为例):
usr/local/nginx/conf/vhost
目录下,添加完毕,重新载入配置文件Nginx,便可使用WordPress的持久链接!