?> 求WORDPRESS运行在WDCP一键包,NGINX环境下,伪静态的方法!(页 1) - wdCP V2|linux下免费的服务器/虚拟主机管理系统 - WDlinux官方论坛 Linux服务器架构,性能优化.免费CDN系统,智能DNS,负载均衡,集群分流等应用 - Powered by Discuz! Archiver

WDlinux官方论坛's Archiver

hackdove 发表于 2012-4-18 12:31

求WORDPRESS运行在WDCP一键包,NGINX环境下,伪静态的方法!

求WORDPRESS运行在WDCP一键包,NGINX环境下,伪静态的方法!

论坛搜索了几个不好用。

求详细教程,谢谢。

shujun 发表于 2012-4-19 23:11

我试了一下 不是教程问题  。[code]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;
        }
}
[/code]在其他的nginx都是可以用的  可是用在wdcp里却不能加.html  否则就404  具体原因正在分析中

shujun 发表于 2012-4-21 21:53

重新发一个可以用的 亲测 nginx可用[code]rewrite ^.*/files/(.*)$ /wp-includes/ms-files.php?file=$1 last;

if (!-e $request_filename) {

rewrite ^.+?(/wp-.*) $1 last;

rewrite ^.+?(/.*\.php)$ $1 last;

rewrite ^ /index.php last;

}[/code]

Skmabon 发表于 2012-4-24 23:11

需要在nginx的配置文件引用为静态规则才可以使用,规则就如楼上的吧。

dazhaimen 发表于 2017-10-1 02:59

[b]回复 [url=http://www.wdlinux.cn/bbs/redirect.php?goto=findpost&pid=6230&ptid=1894]3#[/url] [i]shujun[/i] [/b]



好用

页: [1]

Powered by Discuz! Archiver 7.2  © 2001-2009 Comsenz Inc.