1.Have domains pointing to main domain type where cms is installed
2. Changes to Config.php
#$config['root_url'] = 'http://'. $_SERVER['SERVER_NAME'];
$config['root_url'] = 'http://'. $_SERVER['HTTP_HOST'];
3. Set domain type in Template
{global_content name='domaintype'}
4. Create Global Content domain type
{* some initial setup *} {* strip www. dots and dashes from server host name and assign to a variable for later use *} {assign var=tldtype value=$smarty.server.HTTP_HOST|replace:'www.':''} {if $tldtype eq 'domain.co.za'} {assign var=tld value='.co.za'}{* tld is this domains domain type *} {elseif $tldtype eq 'domain.com'} {assign var=tld value='.com'} {elseif $tldtype eq 'domain.net'} {assign var=tld value='.net'} {else} {assign var=tld value='.'} {/if} {* end setup *}
5. Use tld in site variables example below Google analytics* place in template
{global_content name="$tld-analytics"}
6. Create Global Content variable for each tld
.co.za-analytics
.com-analytics
Note Multi site seemed to work better by removing www via htaccess , better for SEO as well
#Remove www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.net$ [NC]
RewriteRule ^(.*)$ http://domain.net/$1 [R=301,L]
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.domain.co.za$ [NC]
RewriteRule ^(.*)$ http://domain.co.za/$1 [R=301,L]
External php still has issues even with UDT
Solution - Multi Site with google Analytics Guide
For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Jump to
- Official Boards
- ↳ README FIRST!!!
- ↳ Announcements
- ↳ General Discussion
- Support Boards
- ↳ CMSMS Core
- ↳ Modules/Add-Ons
- ↳ Help Wanted (commercial)
- ↳ Translations
- Community Boards
- ↳ Tips and Tricks
- ↳ CMS Show Off
- ↳ Layout and Design (CSS & HTML)
- ↳ Feature ideas
- ↳ Developers Discussion
- ↳ The Lounge
- International Discussions
- ↳ Czech/Slovak - Česky/Slovensky
- ↳ Danish - Dansk
- ↳ Dutch - Nederlands
- ↳ Aankondigingen
- ↳ Tips en Trucs
- ↳ Vertalingen & Documentatie
- ↳ Hulp gezocht (commercieel)
- ↳ Finnish - Suomi
- ↳ French - Français
- ↳ German - Deutsch
- ↳ BITTE ZUERST LESEN !!!
- ↳ Ankündigungen
- ↳ Installation und Einstellungen
- ↳ Module und Tags
- ↳ Smarty-Tipps und -Tricks
- ↳ Layout und Design
- ↳ Suchmaschinenoptimierung (SEO)
- ↳ HowTo's
- ↳ Übersetzungen
- ↳ Show Off
- ↳ Hilfe gesucht (kommerziell)
- ↳ Stammtisch
- ↳ Hungarian - Magyar
- ↳ Italian - Italiano
- ↳ Moduli/Plugins
- ↳ Lithuanian - Lietuviškai
- ↳ Darbo / bendradarbiavimo pasiūlymai ir paieška
- ↳ Persian / Farsi
- ↳ Polish - Polski
- ↳ Portuguese - Português
- ↳ Russian - русский
- ↳ Предложения и поиск РАБОТЫ
- ↳ Spanish - Español
- ↳ Swedish - Svenska
- Geekmoot Editions
- ↳ Geekmoot 2016
- ↳ Connections and Conversations
- ↳ Geekmoot 2015
- ↳ Geek Moot 2012
- ↳ Locked: Geek Moot 2010
- Old Forums
- ↳ [locked] CMSMS 2.0 Beta
- ↳ Module Developers
- ↳ Closed Issues
- ↳ [locked] Documentation0ld
- ↳ Suggestions, Modifications & Corrections
- ↳ [locked] CMSMS 1.11 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 1.10 Beta
- ↳ Closed Issues
- ↳ [locked] CMSMS 2.2 Beta
- ↳ [locked] CMSMS MLE fork
- ↳ Modules/Addon patchs
- ↳ [locked] Quality Assurance
- ↳ [locked] Accessability and Usability
- ↳ [locked] Documentation
- ↳ Media and presentations about CMSMS
- ↳ [locked] Installation, Setup and Upgrade