开发者社区> 问答> 正文

ACE怎么设置pathinfo模式

location /
        {  
            if (!-e $request_filename){  
                rewrite ^(.*)$ /index.php?s=/$1 last; #rewrite模式  
                #rewrite ^(.*)$ /index.php/$1 last; #pathinfo模式 任选其一  
            }  
        }
以上为在nginx里设置 ThinkPHP伪静态方法,
然后我在ACE中app.yaml 设置 rewrite ^/(.*)$ /index.php?s=/$1 last  发现没有作用
不知道是不是我的语法有问题

展开
收起
wang-dong 2014-03-06 16:50:43 6396 0
1 条回答
写回答
取消 提交回答
  • ReACE怎么设置pathinfo模式
    我也有这种情况,我在网上找了好多帖子,按照这个设置都不成功
    location / {        
        if (!-e $request_filename) {
            rewrite  ^/(.*)$  /index.php/$1  last;
                    break;
            }
    }

    location ~ \.php {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_index index.php;
        include fcgi.conf;
        set $real_script_name $fastcgi_script_name;
        if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
            set $real_script_name $1;
            set $path_info $2;
        }
        fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
        fastcgi_param SCRIPT_NAME $real_script_name;
        fastcgi_param PATH_INFO $path_info;
    }
    2014-04-10 11:46:08
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载