用户
 找回密码
 入住 CI 中国社区
搜索
查看: 1380|回复: 1
收起左侧

[URL] 新手,我的ci无论打开什么地址,访问的都是默认路由,什么问题啊?

[复制链接]
发表于 2017-9-16 19:20:32 | 显示全部楼层 |阅读模式
$config['uri_protocol']        = 'PATH_INFO';

这是我nginx的配置
  1. server {
  2.   listen    8083;
  3.   # 这个表示 网站域名, 可以是二级甚至多级域名
  4.   server_name localhost;

  5.   # 表示默认索引文件
  6.   index index.html index.htm index.php;

  7.   # 该站点对应的网站根目录所在
  8.   # root  /mnt/hgfs/website/basic/;

  9.   root /mnt/hgfs/website/merchant;

  10.   location / {
  11.        root   html/kdw;
  12.        index  index.php;
  13.        try_files $uri $uri/ /index.php?$uri&$args;
  14. }

  15.   location ~ .*\.(php|php5)?$
  16.   {
  17.     #fastcgi_pass unix:/tmp/php-cgi.sock;
  18.     fastcgi_pass 127.0.0.1:9000;
  19.     fastcgi_index index.php;
  20.     fastcgi_split_path_info ^((?U).+.php)(/?.+)$;
  21.     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  22.     fastcgi_param PATH_INFO $fastcgi_path_info;
  23.     fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;


  24.     #fastcgi_param PATH_INFO $fastcgi_path_info;
  25.     include fastcgi.conf;
  26.     if (!-e $request_filename) {
  27.             rewrite ^(.*)$ /$1 last;
  28.             break;
  29.        }
  30. }
  31.   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  32.   {
  33.     expires 30d;
  34.   }
  35. }
复制代码


发表于 2017-9-18 10:40:48 | 显示全部楼层
说明你的 PATH_INFO 有问题,建议用 REQUEST_URI

本版积分规则