Welcome Guest, Not a member yet? Register   Sign In
Check if at root domain
#1

[eluser]Dauntless[/eluser]
Hi,

Sorry for the bad title. My situation is as follows:

A website must have 2 'sub parts': Sales & Rent. The website is divided through sales.yyy.com and rent.yyy.com. Both urls should refer to the same directory on the server (the main directory, yyy.com). I then check if the user is at rent or sales and display the correct content accordingly.

I currently use preg_match to check for the sub domain, but I also need a way to see if the user is at yyy.com (without sub domain, or on a different sub domain than rent or sales). I want to display a splash screen letting the user choose between rent & sales.

How could I check if I'm at yyy.com. I suspect I could also do this with preg_match, but I'm hoping there's a better way ?

Thanks!


Messages In This Thread
Check if at root domain - by El Forum - 03-02-2009, 06:18 AM
Check if at root domain - by El Forum - 03-02-2009, 06:42 AM
Check if at root domain - by El Forum - 03-02-2009, 10:06 AM
Check if at root domain - by El Forum - 03-02-2009, 10:35 AM
Check if at root domain - by El Forum - 03-02-2009, 10:51 AM
Check if at root domain - by El Forum - 03-02-2009, 11:02 AM
Check if at root domain - by El Forum - 03-02-2009, 11:25 AM
Check if at root domain - by El Forum - 03-02-2009, 12:50 PM
Check if at root domain - by El Forum - 03-02-2009, 01:10 PM
Check if at root domain - by El Forum - 03-04-2009, 12:31 PM
Check if at root domain - by El Forum - 03-04-2009, 01:06 PM
Check if at root domain - by El Forum - 03-04-2009, 01:22 PM
Check if at root domain - by El Forum - 03-04-2009, 04:31 PM
Check if at root domain - by El Forum - 03-04-2009, 04:44 PM



Theme © iAndrew 2016 - Forum software by © MyBB