(I'm not familiar with Chameleon, but from what I see after a quick look, you could be able to make it work.)
However, the Joomla Documentation has an article regarding a similar example, with a couple of different approaches. You should take a look at it.
The following should work, although I haven't tested it (based on option #3 from the link above):
Basically, you set up your cPanel with a main domain (englishsite.com
) and an addon domain (frenchsite.com
). Then you could tweak the following code to fit your needs, and add it to your templates index.php
AT THE VERY BEGINNING:
<?php
$domain = $_SERVER["SERVER_NAME"];
$requri = $_SERVER['REQUEST_URI'];
if (($domain == "www.englishsite.com" && $requri == "/" ||
$domain == "englishsite.com")) {
header("Status: 301 Moved Permanently");
header("Location: http://www.englishsite.com/en");
}
if (($domain == "www.frenchsite.com" && $requri == "/" ||
$domain == "frenchsite.com")) {
header("Status: 301 Moved Permanently");
header("Location: http://www.frenchsite.com/fr");
}
?>
Make sure you enable SEF urls for your site (Global Configuration -> SEO settings).
Finally, go to the plugin manager and locate the plugin System - Language Filter
. In the plugin settings, set "Remove URL Language Code" to Yes.
