smallhe 发表于 2013-5-25 12:39:09

问个小问题。。。

在浏览器显示的url, 我想要所有的contorller的方法都显示成后缀是.html的

目前我测了一下。。

比如:

        public function index()
        {
                redirect('admin/manage');
        }

只要访问这个index方面,跳转到manage后,就在manage后面自动加上了html ,变成了 admin/manage.html


但其它不用redirect 方法的就没有.html后缀。

我的rewrite是这样写的。不知道是哪里错了。
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;
}
}




hcmtl 发表于 2013-5-25 22:45:37

smallhe 发表于 2013-5-26 11:37:37

hcmtl 发表于 2013-5-25 22:45 static/image/common/back.gif
配置文件里面:application/config/config.php里面有个$config['url_suffix'] = ''; 改成$config['url_suff ...

这个一直加着呢。。

hcmtl 发表于 2013-5-26 16:51:18

smallhe 发表于 2013-5-31 23:41:34

:(:(:(:(
页: [1]
查看完整版本: 问个小问题。。。