3
votes

We recently moved a number of static websites from multiple (regional) domains onto a single .com domain which uses Joomla! to serve up content. The new site uses subdirectories and allows uses to navigate between countries. Like this:

  • newdomain.com/country-name1
  • newdomain.com/country-name2
  • newdomain.com/country-name3

We would now like each site to go back to having it’s own domain, but to essentially serve up the same website the user would be seeing by viewing the sub directory (we’ll probably drop the ability to navigate between countries, back that’s largely irrelevant to this post).

How can we do this with as little work as possible to the templates whilst retaining a single Joomla! instance? Has anyone got any experience of similar? I've read some articles but am not sure any of them give the user a true sense of being on a separate domain. I could of course be wrong (tbh, this is a little out of my field of expertise). Spoon-feeding appreciated. :)

1
Subscribing. I don't know of anyone doing multi-site installs like you could with Drupal.isherwood
This is not provided by the core. You may want to look into building a multilingual website, it might serve you well.Valentin Despa
Just to clarify, the differences between the sites are not language, but product/offering. This isn't about finding a solution to multiple languages, but about retaining the current Joomla! instance BUT across multiple domains, through the path of least resistance. Thanks.RJB
If your sites are on the same host and behing Apache you could try internal .htaccess rewrite using the [PT] flag, see here: httpd.apache.org/docs/2.2/rewrite/flags.html#flag_ptJan Misker

1 Answers

0
votes

You could try mapping the requests to the relevant folders

RewriteCond %{HTTP_HOST} ^(www\.)?newdomain\.com [NC]
RewriteRule ^/(.*) /country-name1/$1 [L]

RewriteCond %{HTTP_HOST} ^(www\.)?newdomain\.fr [NC]
RewriteRule ^/(.*) /country-name2/$1 [L]

RewriteCond %{HTTP_HOST} ^(www\.)?newdomain\.de [NC]
RewriteRule ^/(.*) /country-name3/$1 [L]

That should map a request for

newdomain.com/country-name1/somepage to newdomain.com/somepage

newdomain.com/country-name2/page to newdomain.fr/page

etc

Obviously you'd also have to make all domain names resolve to the same folder.