Home > Backend Development > PHP Tutorial > nginx 路径解析

nginx 路径解析

WBOY
Release: 2016-06-06 20:34:07
Original
1161 people have browsed it

访问的地址:http://ju.com/admin.php/DaiLogin/showLogin
错误提示:
2015/05/26 19:09:16 [error] 24049#0: *546 rewrite or internal redirection cycle while processing "/index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//admin.php/DaiLogin/showLogin", client: 127.0.0.1, server: ju.com, request: "GET /admin.php/DaiLogin/showLogin HTTP/1.1", host: "ju.com"
nginx的配置参数:

nginx 路径解析
服务器也是这个配置 没有问题 就是nginx的版本一样。本地这个重新怎么会有这么多的index.php
我应该怎么修改?

回复内容:

访问的地址:http://ju.com/admin.php/DaiLogin/showLogin
错误提示:
2015/05/26 19:09:16 [error] 24049#0: *546 rewrite or internal redirection cycle while processing "/index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//index.php//admin.php/DaiLogin/showLogin", client: 127.0.0.1, server: ju.com, request: "GET /admin.php/DaiLogin/showLogin HTTP/1.1", host: "ju.com"
nginx的配置参数:

nginx 路径解析
服务器也是这个配置 没有问题 就是nginx的版本一样。本地这个重新怎么会有这么多的index.php
我应该怎么修改?

这不是nginx rewrite经典的死循环问题吗。把你location / 下的rewrite最后的last改成break 就好了。

last 会在检测到URL匹配后,继续匹配location,当然能匹配到 / ,所以就死循环了,nginx判断10次后退出,也就是你提问里出现了 1 + 10 = 11 个index.php。

参考这里: http://segmentfault.com/a/1190000002797606

网站已经能访问了啊

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template