I’m working on a site which has 2 domain names pointing at it – [url]www.sitename.co.uk[url]www.sitename.ie.
This is the script and it works fine:
if (document.referrer.indexOf(‘sitename.ie’) > -1)
location.href = ‘
else
location.href = ‘
I’ve actually set it up on ‘index.htm’ and there’s nothing else on that page apart from the script. The problem is that it doesn’t work if the user simply types the domain name into the browser – if he types in ‘www.sitename.ie’ he still gets the .co.uk home page.
Is there a simple fix for this? I hope so because I’m by no means a javascript expert!
Bob.
PS I also wonder about the wisdom of having an ‘index.htm’ page with only a script on it – how will search engines react to this? Maybe there’s a better way to achieve what I need?