no need server name for define('ROOT_URL', '')?
Page: 1
After installation in front of my server, following codes are generated automatically in "config/config.php":
define('ROOT_URL', 'http://localhost/activeCollab0.7');
The problem is I am trying to config my apache so that aC be accessbile by multiple ways:
1) http://localhost/activeCollab0.7/ (at my own server only)
2) http://www.my-domain.com/activeCollab0.7/
3) http://my-intranet-name/activeCollab0.7/
4) http://activeCollab.my-domain.com/
5) http://172.28.34.234/activeCollab0.7/
Other computers can not visit aC by above ways, because now all links to hard-coded http://localhost/......!
I tested following codes maybe better:
{
define('ROOT_URL', '/activeCollab0.7');//works for 1).2).3).5), but not 4)
}
Maybe the best way is to define ROOT_URL at run time according to the location of "config.php" file:
{
$hard_drive_base = dirname(dirname(__FILE__)); //hard_drive_base = ../../activeCollab0.7/
$url_base = convertFunction($hard_drive_base); //also need $_SERVER["DOCUMENT_ROOT"]
define('ROOT_URL', $url_base);//without http://... leading
}
Just pseudo codes for your consideration. And...
MERRY CHRISTMAS AND HAPPY NEW YEAR.
define('ROOT_URL', 'http://localhost/activeCollab0.7');
The problem is I am trying to config my apache so that aC be accessbile by multiple ways:
1) http://localhost/activeCollab0.7/ (at my own server only)
2) http://www.my-domain.com/activeCollab0.7/
3) http://my-intranet-name/activeCollab0.7/
4) http://activeCollab.my-domain.com/
5) http://172.28.34.234/activeCollab0.7/
Other computers can not visit aC by above ways, because now all links to hard-coded http://localhost/......!
I tested following codes maybe better:
{
define('ROOT_URL', '/activeCollab0.7');//works for 1).2).3).5), but not 4)
}
Maybe the best way is to define ROOT_URL at run time according to the location of "config.php" file:
{
$hard_drive_base = dirname(dirname(__FILE__)); //hard_drive_base = ../../activeCollab0.7/
$url_base = convertFunction($hard_drive_base); //also need $_SERVER["DOCUMENT_ROOT"]
define('ROOT_URL', $url_base);//without http://... leading
}
Just pseudo codes for your consideration. And...
MERRY CHRISTMAS AND HAPPY NEW YEAR.
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.



