I am trying to redirect a php page. the following is my php script :
$url=$_SERVER['HTTP_HOST'];
header("Location: $url/suppliers");
But the php page throws error saying invalid redirect error. i am not understanding what the problem is. Can anyone help me on this?
try like this:
header("Location: http://" . $_SERVER['HTTP_HOST'] . "/suppliers");
exit();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.