如何删除307重定向? [英] How to remove 307 redirect?

查看:60
本文介绍了如何删除307重定向?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某种原因,我的网站正在执行307重定向。它曾经在codeigniter中进行验证,因此如果用户未登录,它将进行重定向。但是,我取消了此验证,因此现在任何人都可以访问该页面。不过,现在出现了307重定向,我无法取消它。 CI_cookie仍被调用,所以我猜想验证和重定向仍在某个地方缓存,但是我不知道如何删除它,也找不到关于如何刷新缓存的Google信息。

For some reason my site is doing a 307 redirect. It used to have validation in codeigniter, so that if user was not logged in it would redirect. However I took away this validation so that now any person can access that page. Nonetheless, now a 307 redirection appeared and I can't take it away. The CI_cookie is still called, so I'm guessing that the validation and redirect is still cached somewhere, but I don't know how to remove it, nor find any information on google on how to refresh cache if that's what it is.

以下是标头信息:

Here is the header info:

注意:重定向曾经发生在控制器内部,而不是.htaccess文件中。我使用会话进行用户验证。我没有发布它,因为它不再存在于文件中,但是,如果您需要查看它,请告诉我,我会更新我的问题。

Note: the redirection used to happened inside the controller, not on a .htaccess file. I used sessions for the user validation. I'm not posting it because it's no longer on the file, however if you need to see it just let me know and I'll update my question.

也如果您能解释一下我的反对意见,那就太好了。我知道这个问题不是重复的,因为我在任何地方都找不到。谢谢!

Also it would be nice if you could explain me the downvote. I know this question isn't a duplicate because I haven't found it anywhere. Thanks!

推荐答案

问题尚不清楚,但我会使用像这样的cookie管理器扩展

Not really clear from question but I would use a cookie manager extension like this one

并清除会话cookie,您可以在config.php中找到会话cookie的名称

and clear the session cookie, you can find the name of the session cookie in config.php

$config['sess_cookie_name']     = 'your_session_cookie_name';

当您删除会话cookie并刷新页面时,CI将(在后台)调用session_destroy()方法并创建一个新会话,因此从客户端删除会话cookie将使服务器不得不重新生成一个新会话。

when you delete the session cookie and refresh the page, CI will (in the background) call session_destroy() method and create a new session, so deleting the session cookie from the client will oblige the server to regenerate a new session.

话虽如此,如果销毁会话没有帮助,我们将无法真正的答案而没有看到控制器

that being said, if destroying the session doesn't help, we can't really answer without seeing the controller

这篇关于如何删除307重定向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆