Skip to Content Skip to Menu

Multi sites

  • jasperli
  • jasperli
  • OFFLINE
  • Posts: 21
  • Thanks: 0
  • Karma: 2
15 years 6 months ago #78132 by jasperli
Multi sites was created by jasperli
Hay,

I know these guys are building such a component. Although it's only J1.5 now: www.jms2win.com/

I did it different:
I have a site which has multiple domainnames and depending on the URL given in the browser it's loading different module positions (or different menu's so you can add or remove components in these menus).
All i did was reading out the php_uri as follows:

Add in the <head>:

<? $mosConfig_live_site = 'http://'. $_SERVER;?>

Then in your template you can do something like this:

if ($_SERVER==" www.domain1.info ") {
echo "load some modules here";
}
elseif ($_SERVER==" www.domain2.info ") {
echo "load other modules here";
}

Works perfect.

Jasper
Jasper

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum

Facebook Twitter LinkedIn