1198345 发表于 2015-1-2 11:59:35

Windows下nginx WordPress 静态规则设置

网上找一天没有结果哪位高人指点一下 WordPress插件不好用 主要是 nginx静态规则咋配置

taekook674 发表于 2015-1-2 11:59:36

WordPress 的大多数重写插件都是为 Apache (.htaccess) 写的,所以在 Nginx 上通常不好用。要让固定链接正常工作,你只需要在 `nginx.conf` 里加上 `try_files $uri $uri/ /index.php?$args;` 这条规则。我就是这么用的,跑得很稳,不需要插件了

bjzhush 发表于 2015-1-16 17:14:23

在location /{..................}里面加入
if (!-f $request_filename){
rewrite (.*) /index.php;
}
这个你试下

416222419 发表于 2015-2-9 18:24:22

可以去军哥的网站copy一下。全有。

1198345 发表于 2015-2-9 21:15:12

bjzhush 发表于 2015-1-16 17:14
在location /{..................}里面加入
if (!-f $request_filename){
rewrite (.*) /index.php;


谢谢你的答复 不过没有测试成功

1198345 发表于 2015-2-9 21:18:02

416222419 发表于 2015-2-9 18:24
可以去军哥的网站copy一下。全有。

弱弱的问一句 网址 谢谢

416222419 发表于 2015-2-9 22:00:17

www.lnmp.org
页: [1]
查看完整版本: Windows下nginx WordPress 静态规则设置