My Favourite Joomla Trick?
: Screen Capture and Audio Session
Running Time: 10 Minutes
Description: This is a real special video. Inside I’ll show you a special trick that allows you to have multiple domains with identical Joomla Sites!
Here’s an example:
Notice any differences? It’s a simple fix that can make branding your business alot easier. Watch now and find out how.
Resources Mentioned:
-
Amember – Get A Copy Here
-
Community Builder – Download It From Here
The Code you Need:
/* Tommy Hack! START
Grabs the hostname, ip, etc instead of defining a fixed address 😉
http://tommytaylor.co.uk – check out the dev section!
*/
$SERVER_NAME = $_SERVER[“SERVER_NAME”];
$IP = gethostbyname ($SERVER_NAME);
$server = gethostbyaddr($IP);
if ($SERVER_NAME == $server) {
$data = $_SERVER[‘SCRIPT_FILENAME’];
$splitpath= explode(‘/’, $data);
$hostpath = $splitpath[2];
$serverhosteffort = ”.$IP.’/~’.$hostpath.”;
} else {
$serverhosteffort = $_SERVER[‘HTTP_HOST’];
}
$mosConfig_live_site = ‘http://’.$serverhosteffort.”;
/* Tommy Hack! FINISH */