nginx下wordpress 固定链接问题

情况是这样的,

我的wordpress并不是放在网站的根目录的,而是放在/blog目录下的,然后在wordpress中设置固定链接的时候,每次都出错,用了网上几个方法都不行,后来在http://codex.wordpress.org/Nginx 找到一个解决办法。

 

我正好安装了wp super cache的插件,那么在nginx.conf中添加如下:

image

代码如下:

set $cache_uri $request_uri;
        location /blog {
            try_files /blog/wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /blog/index.php?$args ;
        }

posted @ 2014-08-02 11:14  HuangJacky  阅读(1519)  评论(0编辑  收藏  举报
AdminLogin