简体   繁体   English

页面未正确重定向,代码错误

[英]The page isn’t redirecting properly error in codeigniter

I am getting a very unusual error, most of the time I can fix this The page isn't redirecting properly very quickly as it's either something messed up with htaccess or in php script but I have looked for hours and can't find the single problem. 我遇到了一个非常不寻常的错误,大多数时候我可以解决此问题。 The page isn't redirecting properly快速The page isn't redirecting properly因为它可能是与htaccessphp script搞混了,但我找了好几个小时却找不到单个问题。

The page loads once with broken css and javascript files, and takes a long time to load but after that this error starts to appear and it'll only fade away when you clear the browsers cache then again the website loads for one time only before showing this error. 该页面一次加载了破碎的css和javascript文件,并且加载时间很长,但是此后该错误开始出现,并且仅当您清除浏览器缓存后,该错误才会消失,然后仅在显示之前再次加载该网站一次这个错误。

Some details 一些细节

  • .htaccess file is blank .htaccess文件为空
  • I tried loading just the welcome module only but the problem remains same. 我尝试仅加载欢迎模块,但问题仍然存在。
  • The server has been updated so I am wondering if this may have caused this problem. 服务器已更新,所以我想知道这是否可能导致此问题。

I hope you guys can help me figure out why my website is on redirection loop, I can feel it's something related with cookies but I am not sure what. 我希望你们能帮助我弄清楚为什么我的网站处于重定向循环中,我可以感觉到它与Cookie有关,但是我不确定。

File Structure 档案结构

  • application 应用
  • cgi-bin cgi-bin目录
  • cronjobs cronjobs
  • system 系统
  • images 图片
  • system 系统
  • .htacess .htacess
  • index.php 的index.php
  • test.php test.php的

Edit: 编辑:

Website works flawlessly on localhost. 网站可以在localhost上正常运行。

For future if someone stumbles upon this issue, I found out that the sessions were causing issues. 将来如果有人偶然发现此问题,我发现这些会话正在引起问题。 I was auto loading the session library and when i removed it to test, it all started to work smoothly. 我正在自动加载会话库,当我将其删除以进行测试时,所有库都开始顺利运行。 So basically the main problem is with my php configuration and I have got my server guy to look into why the sessions are not working. 所以基本上主要的问题是我的php配置,我让我的服务器人员研究了为什么会话无法正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM