[英]Catching ERR_TOO_MANY_REDIRECTS
How can I catch ERR_TOO_MANY_REDIRECTS with .htaccess or even in PHP and redirect to 404 page? 如何使用.htaccess甚至在PHP中捕获ERR_TOO_MANY_REDIRECTS并重定向到404页面?
Print: http://prntscr.com/j0xh1m 打印: http : //prntscr.com/j0xh1m
It's possible? 这是可能的? Thanks anyway
不管怎么说,还是要谢谢你
ERR_TOO_MANY_REDIRECTS
is a browser error, you cannot catch it at server level. ERR_TOO_MANY_REDIRECTS
是浏览器错误,您无法在服务器级别捕获它。 You may only try to detect whether the user has fallen into a redirect loop and display your error page before browser will block redirections. 您只能尝试检测用户是否陷入重定向循环并在浏览器阻止重定向之前显示错误页面。
But correct solution is fixing your app and avoid redirection loops in the first place. 但是正确的解决方案是修复您的应用程序,并首先避免重定向循环。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.