PHP: Redirect based on host request
Posted on 2014-04-16
I have a page. If the user types in the following I want them to get a certain page, if not they get normal page.
I have two domains resolving to one website. This is temporary, but for two weeks I need it to be this way.
If user comes to my site by typing in "mysite.com", then I want to take them to "mysite.com/play". If they come by typing the other domain, "mysite2.com", the should just load the page normally.
what would the php for this be?