zhangliyang

[问题求助] nginx怎么弄伪静态呀 快奔溃了!

nginx怎么弄伪静态
if (!-f $request_filename){
        set $rule_1 1$rule_1;
}
if (!-d $request_filename){
        set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
        rewrite ^(.*?)/index\.(html|htm|php) $1/index.$2 last;
        rewrite ^(.*?)/(.*) $1/index.php?u=$2 last;
}
这个复制到主机根本没用


#1楼
发帖时间:2015-3-26   |   查看数:0   |   回复数:3
bjwindy
引用 zhangliyang:

nginx怎么弄伪静态if (!-f $request_filename){        set $rule_1 1$rule_1;}if (!-d $request_filename){        set $rule_1 2$rul


后台有明确提示,选择nginx后,出来的伪静态规则就是
2015-4-28 #2楼
fengzi
nginx 的规则是:
if (!-e $request_filename) {
                rewrite ^/(.+) /index.php?rewrite=$1 last;
}
2015-6-14 #3楼
suntan
手脚
2015-7-19 #4楼
游客组