php跳转不正确是什么问题。

2013-12-13 12:00:15 +08:00
 coolicer
我自己下载了phpMyAdmin,然后登录的时候会跳到根目录。要自己补回目录才能进去,网上查到有一个跟我一样的。他加了在config加了SCRIPT_FILENAME和SCRIPT_NAME就可以了,可是我已经是加了这些东西在fastcgi_params。

server {
listen 80;
server_name localhost;
root /home/wwwroot;
index index.html index.htm index.php;

# location /pma {
# index index.php;
# }
# location ~ ^/pma/.*\.(php|php5)$ {
# fastcgi_pass unix:/var/run/php5-fpm.sock;
# include fastcgi_params;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# fastcgi_split_path_info ^(.+\.php)(.*)$;
# }

if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}

location ~ \.php
{
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
}
}
~
2705 次点击
所在节点    NGINX
1 条回复
txlty
2013-12-14 15:29:59 +08:00
可能你用 localhost/phpmyadmin 访问的
试试 localhost/phpmyadmin/ (把后面反斜杠补全)

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/92995

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX