Right, I have a customer who has two domains, but to keep things simple we're going to be hosting the site on one server space. (Its just the english/welsh version of the domain.) What I'd like is for the english domain name to point to index.php which would be the default language of the page. But for the welsh version of the domain to point to index.php?lang=cy (no I don't want to use redirect account on the server)
Easy: Code: <?php // get referrer from _SERVER array $ref = $_SERVER["HTTP_REFERER"]; // look for bad guys! if ($ref == 'http://welshurl') { //reload with lang=cy //and any other stuff } else { // load en site } ?>
Don't do that , there could be some one like me that dose not send referer info. Il post something up in a bit if it works.