ci的url,加上入口文件和不加入口文件,为啥差别这么大?

php中文网
发布: 2016-06-23 13:23:02
原创
1168人浏览过

http://aa.baidu.dd/index.php/fdsafdeeee/index/1.html
http://aa.baidu.dd/index.php/joifdafdfdsan/index/1.html
http://aa.baidu.dd/index.php/feppppoin/indefdasfdax/1.html
无论写啥都跑到默认home控制器了,哪怕是index.php后面的控制器不存在。
但是只要去掉index.php,就没问题了,指哪打哪,这是神马原因
下面是我在nginx中的虚拟机配置:

	server {        listen       80;        server_name  aa.baidu.dd;		index index.php;		client_max_body_size 5m;		client_body_buffer_size 128k;		        charset utf-8;        location / {            root   /var/www/baidu/wx;            index  index.php;			if (!-e $request_filename)			{				rewrite  ^/(.*)$  /index.php/$1  last;				break;			}        }        error_page  404              /404.html;        error_page   500 502 503 504  /50x.html;        location = /50x.html {            root   html;        }				location ~ .+\.php($|/){			set $script    $uri;			set $path_info  "/";			if ($uri ~ "^(.+\.php)(/.+)")			{				set $script     $1;				set $path_info  $2;			}            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  script_filename  /var/www/baidu/wx$fastcgi_script_name;            include        fastcgi_params;        }    }
登录后复制

Text-To-Pokemon口袋妖怪
Text-To-Pokemon口袋妖怪

输入文本生成自己的Pokemon,还有各种选项来定制自己的口袋妖怪

Text-To-Pokemon口袋妖怪 48
查看详情 Text-To-Pokemon口袋妖怪


回复讨论(解决方案)

明白了  是nginx配置问题

rewrite  ^/(.*)$  /index.php/$1  last;

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号