情况是这样的,

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

 

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

nginx下wordpress 固定链接问题

代码如下:

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 ;
        }

相关文章:

  • 2022-12-23
  • 2021-06-08
  • 2021-11-09
  • 2021-10-02
  • 2021-07-24
  • 2021-11-27
  • 2021-07-08
  • 2021-11-16
猜你喜欢
  • 2021-10-14
  • 2022-12-23
  • 2022-02-17
  • 2021-05-23
  • 2021-11-17
  • 2022-01-27
相关资源
相似解决方案