I have a loose partnership with two others and we share a reseller account. We don't host just anyone who needs web space. We have two different kinds of clients, those who use our CMS and those who use Wordpress. Each type of client is set up differently. It is my local setup for the clients using our CMS with which I need help.
The clients who use our CMS do so through an admin panel that . . . okay, explaining it that way is going to be confusing and this whole thing, if you're not using it all the time like we are, is confusing enough.
On our reseller we have a domain that holds all our CMS files. On that individual hosting we have client domains hosted as add-on domains. This gives them an individual presence and gives them access to our stable of content management scripts. When they access the url for their admin, a script checks the url, tests it for site versus host and redirects them as necessary before they sign in. It goes like this.
- Code: Select all
if (isset($logout)) {
unset($logout);
$_SESSION=array();
echo "<meta http-equiv='refresh' content='0; url=http://www.$site'>";
}
// The next bit of happiness is to make sure Admin load from the right url when something requiring the editor is loaded.
if (strstr($HTTP_HOST, $site)) {
echo '<script language="JavaScript">';
echo 'window.location.href = "http://www.officeelfsites.com/'.$loc_dir.'/Admin.php";';
echo '</script>';
}
if (isset($_SESSION['siteusid']) && $_SESSION['siteusid'] != $siteid) {
unset($message);
$message="<p style='font-weight:bold;'>SiteID is $siteid. Sessions is:";
foreach($_SESSION as $key=>$value) {
$message="<br>$key = $value";
}
$message.="<p>Sessions are being unset.";
$_SESSION=array();
}
if (!isset($_SESSION['siteusid'])) {
$_SESSION['siteusid']=$siteid;
$_SESSION['level']="admin";
}
For them to access the cms scripts, they have to be on the oesites domain, in their directory, using their admin. I can comment out the whole admin header script (noted above), but that requires me to change the file before uploading it, and that's what I'm trying to avoid.
How do I "host" officeelfsites.com on my xampp installation? Is there a function for adding a domain or aliasing a domain or something that's going to give me the test bed setup I need?
Thanks.