Question

I am asking if is it possible do the following thing using Joomla

I have 2 different URL, something like: www.stupidname.com and www.seriousname.com

If the user open stupidname.com by his browser will open the website having a stupid template If the user open seriusname.com by his browser will open the website having a serious template

The website and the content are the same...should only change the template according to the url open in the browser

Do you have some ideas about how to do this thing?

Thanks Andrea

Was it helpful?

Solution

I've done this before making elements of a template conditional based on the domain name, and that can work well. I suppose you could extend the same logic to change the template.

Perhaps you could add a conditional to both template's index.php to change the template. Perhaps something like...

if ( substr_count( $_SERVER['HTTP_HOST'], "silly") ) {
   $GLOBALS["mainframe"]->setTemplate = "silly_template_name";
} else {
   $GLOBALS["mainframe"]->setTemplate = "serious_template_name";
}

...I've not tested this, but I think in principle it should work fine, though it might depend on which Joomla version you have.

There are, as saji89 pointed out, plenty of good multi-site extensions and that'd be an ok solution too.

OTHER TIPS

From my personal experience with Joomla I can advise you to use the component Virtual Domains (http://extensions.joomla.org/extensions/core-enhancements/multiple-sites/7557) you can add the domains which you redirect to the main site where Joomla is installed and it this component you assign them the template you want.

I can confirm the functionality on Joomla 2.5 latest update with usage of around 5+ different Virtual Domains on one Joomla installation.

Some possible downsides i want to mention: SEO links can get sometimes messy, you need to play with some SEO component and its settings its better to use same structure and components for boths side its easier because otherwise the administration gets messy but its possible the user which register on one website has automatically account on all of them because its one Joomla

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top