views:

210

answers:

1

Hi All,

I have a web site which has 2 domains

ex : www.site1.com www.site2.com (which will forward to www.site1.com with domain masking)

www.site1.com is where the actual web server rungs

www.site2.com is just a domain name forwarder and I use mask to make the user feel he/she is in www.site2.com even though he/she is in www.site1.com

But in underlying code I want to distinguish both the request (who came from www.site1.com and who came from www.site2.com) so that I can load their UI accrodingly

I tried request.host as well as request.referrer which always gives www.site1.com

and when I get the source code of the www.site2.com (which redirects to site1) it has this,

sameera gayan

So what is the best option for getting the 2 different site URL's ,

thanks in advance

cheers, Sameera

+1  A: 

If you have a static IP, you could set up www.site2.com to point to the IP address, instead of the other domain name.

Another option is to create a third name as a subdomain of site1.com, such as site2.site1.com that points to the same place as www.site1.com. Then forward www.site2.com to site2.site1.com. You would then be able to pick up that alias.

MattMcKnight