简体   繁体   English

PHP在重定向之前加载页面

[英]PHP loads a page before redirecting

For example, I have this route on web.php: 例如,我在web.php上有以下路由:

Route::redirect('google', 'http://www.google.com')

If go to this route by entering the URL it quickly displays a page saying "Redirecting to http://www.google.com " and then it redirects. 如果通过输入URL转到此路线,它将快速显示一个页面,显示“正在重定向到http://www.google.com ”,然后进行重定向。

When I was working locally this did not happen. 当我在本地工作时,这没有发生。 But once I deployed into the server, it started to happen. 但是,一旦我将其部署到服务器中,它便开始发生。

您在本地看不到它,因为它发生得很快。

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

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