Two different domain points to index.php but gives different

Using a single web hosting account to host multiple sites

Two different domain points to index.php but gives different

Postby zubpani » Fri Aug 15, 2008 7:33 am

Hi everyone!

I have got two domains with same name but one is .com and the other is .co.uk, lets say www.sitename.com and www.sitename.co.uk for example. When I type in the url www.sitename.com, I want the site to display results that is located in USA and when I type in www.sitename.co.uk, I want the page to display results only in UK.

I am using php and I know displaying the appropriate result is a programming question but I wanted to know what Mod rewrite rule can I use to make it work.

So what I want is
www.sitename.co.uk/index.php (this displays results in uk)
www.sitename.com/index.php (this displays results in usa)

How can I achieve this.
Thanks,
Zub
zubpani
 
Posts: 1
Joined: Fri Aug 15, 2008 7:24 am

Postby richardk » Sat Aug 16, 2008 3:12 pm

Do both domains go to the same document root (the same set of directories and files)?
What exactly do you want mod_rewrite to do? If they go to the same files, just use the HTTP_HOST variable in PHP.
richardk
 
Posts: 8800
Joined: Wed Dec 21, 2005 7:50 am


Return to Domain Handling

Who is online

Users browsing this forum: No registered users and 20 guests

cron