CI在nginx下后台404是什么原因
项目目录是这样的file:///C:\Users\youlong\AppData\Roaming\Tencent\Users\314555630\QQ\WinTemp\RichOle\`P3KZ86]L]NNJX0ZTB(Q%~S.jpgadmin/ 后台管理butwhy/ 前台
www/admin.php 走后台管理
www/index.php
前台访问正常,但是打开后台管理报404错误
server {
listen 80;
server_namewww.abc.com;
index index.html index.htm index.php;
root /data/www/butwhy/www;
location /index.php {
index index.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php?$1 last;
break;
}
}
location ~ .*\.(php|php5)?$
{
fastcgi_pass127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
access_log/alidata/log/nginx/access/butwhy.log;
}
file:///C:\Users\youlong\AppData\Roaming\Tencent\Users\314555630\QQ\WinTemp\RichOle\`P3KZ86]L]NNJX0ZTB(Q%~S.jpg
后台的也加了路由规则还是报错
location /admin.php {
index admin.php;
if (!-e $request_filename) {
rewrite ^/(.*)$ /admin.php?$1 last;
break;
}
搞定了,
$config['uri_protocol'] = 'PATH_INFO';改成$config['uri_protocol'] = 'REQUEST_URI';
页:
[1]