Changing link from www.example.com to www.example.com/page
Posted: Thu Dec 06, 2007 3:43 pm
Good evening all! I have a config file written in PHP that tells my website how to set link paths. Currently I am running the website on http://www.centalks.com, but I want to change the paths so the instead of going to centalks.com it would go to the virtual host folder ie. http://www.centalks.com/vhost. I have used $_SERVER[HTTP_HOST] to define centalks.com
How would I direct all my links to http://www.centalks.com/vhost instead of http://www.centalks.com? I know that I have to change the coding in the red, but I don't know what to change it to. All help is appreciated.
Thank you in advance
Code: Select all
<?
//set the path infomation
define ("_HOME_ROOT_", dirname(__FILE__));
[color=red]define("_HTTPS_HOST_", "http://" . $_SERVER[HTTP_HOST]");
define("_HTTP_HOST_", "http://" . $_SERVER[HTTP_HOST]");[/color]
define("_HOME_URL_", _HTTP_HOST_."");
define("_DOC_URL_", "");
define("_INCLUDE_", _HOME_ROOT_ . "/include");
define("_LANGUAGEBAG_DIR_", _HOME_ROOT_ . "/language");
define("_TEMPLATE_", _HOME_ROOT_ . "/template");
define("_UPLOADS_", _HOME_ROOT_ . "/uploads");
define("_CSS_", _DOC_URL_ . "/stylesheet");
define("_SCRIPT_", "/scripts");Thank you in advance