简体   繁体   English

PHP 403禁止重定向

[英]PHP 403 Forbidden on Redirect

I have a weird one. 我有一个奇怪的人。 I have written some code where my script adds something into the database, then after successfully adding it, the page is redirected to the homepage, with some cookies that get set to let the customer know it has been successfully added. 我编写了一些代码,脚本在其中将某些内容添加到数据库中,然后在成功添加脚本后,将页面重定向到主页,并设置了一些cookie,以使客户知道已成功添加该cookie。 Everything was working fine, but then the other day, all of a sudden my client gets a "403 Forbidden - Server configuration does not allow access to this page." 一切工作正常,但是前几天,我的客户端突然收到“禁止访问403-服务器配置不允许访问此页面”的信息。 error. 错误。 If you refresh the page however, it loads fine. 但是,如果刷新页面,则可以正常加载。 It only seems to be on the redirect that it happens. 它似乎只是发生在重定向上。

As mentioned, everything seemed to be working fine until a few days ago. 如前所述,直到几天前一切似乎都工作正常。

Any ideas? 有任何想法吗? I can supply some code if necessary. 如果需要,我可以提供一些代码。

Thanks 谢谢

I've isolated the problem. 我已经隔离了问题。 I was trying to pass a .... within a string that i was saving and passing through a cookie so the client could quickly redeem a second time on the home page. 我试图在保存并通过Cookie的字符串中传递....,以便客户端可以快速第二次赎回主页。 When I removed that, it wasn't throwing the 403 anymore. 当我删除它时,它不再抛出403。

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

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