kee2ka4 Posted August 15, 2008 Share Posted August 15, 2008 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 Quote Link to comment https://forums.phpfreaks.com/topic/119893-two-different-domain-points-to-indexphp-but-need-2-gives-query-different-result/ Share on other sites More sharing options...
corbin Posted August 15, 2008 Share Posted August 15, 2008 Sounds like it would be easier to me to use $_SERVER['HTTP_HOST'] (or some other $_SERVER var) in PHP, but maybe someone will have a decent M_R solution. Quote Link to comment https://forums.phpfreaks.com/topic/119893-two-different-domain-points-to-indexphp-but-need-2-gives-query-different-result/#findComment-617643 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.