[英]PHP - URL redirection weird behavior
I have a PHP code where i am showing a loading icon and then redirecting to URL lets say 我有一个PHP代码,我正在显示一个加载图标,然后重定向到URL让我们说
loadingIcon = "/src/images/load.png" loadingIcon =“/ src / images / load.png”
location = "default.html"; location =“default.html”;
The problem is, it keeps showing the loading icon on the page and won't proceed to the default.html redirection. 问题是,它一直显示页面上的加载图标 ,不会进入default.html重定向。
But if I replace the location to other like location = "google.com" 但是,如果我将位置替换为其他类似location =“google.com”
It will show the loading icon and then go to google.com perfectly. 它会显示加载图标,然后完美地转到google.com。
This basically tells that the problem is in default.html page but I tried opening the page locally, and it was working normally. 这基本上告诉问题是在default.html页面,但我尝试在本地打开页面,它正常工作。
What could be the possible cause of this thing ? 这件事的可能原因是什么?
Please suggest Thank you in advance 请建议先提前谢谢
replace 更换
location = "default.html";
with 同
location = "yourdomain.com/pathtofile/default.html";
or 要么
location = "../../default.html";
note: "../../" should be exact relative path to file. 注意:“../../”应该是文件的精确相对路径。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.