Closed talkcenter closed 6 years ago
这里只是根据登陆态跳转到/login 逻辑在previlegeService 的login_require里
比如我创建Home的控制器怎样配置Home的路由呢?
默认规则的路由不用配置 /Home => HomeAction 中的 action_index /Home/method => HomeAction 中的 action_method
我按照这http://www.billge.cc/demo/#router-rule里去做不能实现呀?
发一下你的目录结构和请求的url 另外nginx是否配置正确 还有路由是需要大小写全匹配的
还有看下返回什么错误 如果是nginx报错 那可能跟nginx配置有关 参考http://www.billge.cc/#overview-index 如果是php报错 麻烦发一下错误信息
我重新配置了一下出现500的报错
错误信息发下
解决了,从头到尾都是我的Apache 配置不对
好的 有问题和建议欢迎随时交流
还有个小问题,logs目录里面我全部清空了,访问一次首页又会出现一个错误的日志文件是什么情况,还是我的配置有问题吗?
日志文件是默认一直会记录的 包括请求的信息以及错误的信息(默认会记录Notice级别以上的错误) /config/config.php中errorLevel 可以配置错误级别
正常应该是一个log_2018-01-13.log
你可以打开看下有些什么错误 输出级别可以在config.php中控制
这是什么错误?
这错误就是 (你的域名)/robots.txt 这个url 404了 可能是你页面或者apache请求的 你可以在 /web/目录下放一个robots.txt 让它能被请求到