您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息

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

2025/7/16 20:10:33发布26次查看
ci的url,加上入口文件和不加入口文件,为啥差别这么大?
本帖最后由 q309056448 于 2015-11-10 00:32:06 编辑 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;
}
}

------解决思路----------------------
rewrite  ^/(.*)$  /index.php/$1  last;
该用户其它信息

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product