Url "mismatch"

Hi, everyone:
Using vhosts on my local machine, when I access the index page from another page (the above lines are from the login.php script) the url address cannot find the page because the address reads “hostname/index.php”

[php]$home_url = ‘http://’ . $_SERVER[‘HTTP_HOST’] . dirname($_SERVER[‘PHP_SELF’]) . ‘/index.php’;
header('Location: ’ . $home_url);[/php]

So, if I backspace over that backslash following “hostname”, the index page comes up. The error page reads “cannot find server .”

So I am thinking the above lines might need urlencode or htmlentities or something like that.

Sponsor our Newsletter | Privacy Policy | Terms of Service