Page 1 of 1

Changing link from www.example.com to www.example.com/page

Posted: Thu Dec 06, 2007 3:43 pm
by praisehim
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

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");
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

Posted: Thu Dec 06, 2007 4:02 pm
by hawleyjr
What type of server are you using?

Posted: Thu Dec 06, 2007 4:48 pm
by JAB Creations
Server's headers say Apache...

.htaccess

Code: Select all

Redirect permanent /1 http://www.centalks.com/2