Reputation: 81
I am trying to use header(location:) with definiton from config.php Config.php :
/*LOCALHOST VERZE:*/ $Path = $_SERVER['HTTP_HOST'] . "/docme"; //echo $Path;
//$PathR = " ". $_SERVER['DOCUMENT_ROOT'] . "/docme/";
//$Path = "' ". $_SERVER['DOCUMENT_ROOT'] . "/docme/";
ini_set('display_errors', TRUE);
date_default_timezone_set( "Europe/Prague" );
//Nastavení konstant webu
define("dbserver", "127.0.0.1");
define("dbuser", "root");
define("dbpass", "mysql");
define("dbname", "docme");
define('site_title', 'DocMe!');
define('path', $Path);
And here I am trying to use it in include and header(location)) but it's still redirecting me to "localhost/docme/localhost/docme/....php"
and not into "localhost/docme/....php"
So is there any way how can I remove actual header location? Or ignore him and redirect directly to page I need? Thank you
Upvotes: 0
Views: 88
Reputation: 18002
Try:
$Path = "http://".$_SERVER['HTTP_HOST'] . "/docme";
To make the url absolute instead of relative
Upvotes: 1