this is what i have tried:
header('location: http://".$_SERVER["HTTP_HOST"]."/HTML-CW/Account.html');
i also tried this
$hostDb = $_SERVER["HTTP_HOST"];
header('location: http://"$hostDb"/HTML-CW/Account.html');
this is what i have tried:
header('location: http://".$_SERVER["HTTP_HOST"]."/HTML-CW/Account.html');
i also tried this
$hostDb = $_SERVER["HTTP_HOST"];
header('location: http://"$hostDb"/HTML-CW/Account.html');
gethostname — Gets the host name https://www.php.net/manual/en/function.gethostname.php
$_SERVER['SERVER_NAME'] Returns the name of the host server (such as www.google.com)
$_SERVER['HTTP_HOST'] Returns the Host header from the current request
http://www.google.com
HTTP_HOST = www.google.com
SERVER_NAME = google.com
http://172.217.31.206
HTTP_HOST = 172.217.31.206
SERVER_NAME = google.com
SERVER_NAME is determined by server configuration; HTTP_HOST is tied to the request
header('location: http://' . $_SERVER["HTTP_HOST"] . '/HTML-CW/Account.html');
or
header('location: http://' . $_SERVER["SERVER_NAME"] . '/HTML-CW/Account.html');
would solve your problem. See " is converted to '.
Also do echo($_SERVER["SERVER_NAME"]) and echo($_SERVER["HTTP_HOST"]) to see what it is outputting in your environment.