One site with multiple domains

Get help with installation and running PivotX 2.0.x here. Please do not post Extension or Theme related questions here.

Re: One site with multiple domains

Postby ljhelbo » Thu Dec 20, 2012 3:34 pm

Thankyou, that looks fine.
ljhelbo
 
Posts: 104
Joined: Sat Feb 26, 2011 2:58 pm
Location: Denmark

Re: One site with multiple domains

Postby camarados » Mon Jan 07, 2013 1:28 pm

And what about pointing to a specific category (same weblog)?

like this?

Code: Select all
$host = $_SERVER['HTTP_HOST'];
if ($host == "houlbjergkirke.salldata.dk") {
    define("PIVOTX_WEBLOG","houlbjerg?c=linkdump");
} elseif ($host == "haurumkirke.salldata.dk") {
    define("PIVOTX_WEBLOG","haurum?c=default");
[...]
}
camarados
 
Posts: 42
Joined: Tue Sep 13, 2011 8:56 am

Re: One site with multiple domains

Postby hansfn » Mon Jan 07, 2013 1:57 pm

No, that won't work - there is no weblog named "houlbjerg?c=linkdump". Maybe something like this?

Code: Select all
$host = $_SERVER['HTTP_HOST'];
if ($host == "houlbjergkirke.salldata.dk") {
    define("PIVOTX_WEBLOG","houlbjerg");
    // Set a default category, if there isn't a query already. (Maybe check for POST arguments too?)
    if (empty($_SERVER['QUERY_STRING'])) {
        $_GET['c'] = "linkdump";
    }
[...]
}
hansfn
Developer
 
Posts: 3230
Joined: Sun Nov 25, 2007 7:48 pm
Location: Molde, Norway

Re: One site with multiple domains

Postby camarados » Wed Jan 09, 2013 1:40 pm

thx, gonna try that!
camarados
 
Posts: 42
Joined: Tue Sep 13, 2011 8:56 am

Previous

Return to 2.x Support Forum

Who is online

Users browsing this forum: No registered users and 1 guest