Is this possible?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
true3000
Forum Newbie
Posts: 1
Joined: Sat Feb 05, 2011 12:50 pm

Is this possible?

Post by true3000 »

Alright, so here's the deal...and yes, I have searched high and low and haven't been able to find the solution I am looking for.

I want to create a subdomain such as texas.mydomain.com and when someone visits that site they get redirected to my main domain BUT with a welcome message such as "Hi Texans, welcome to mydomain.com"...

Now when someone enters just mydomain.com it would read as something generic like..."Hi there"...

Anybody know what the appropriate code would be or at least point me in the right direction?
Neilos
Forum Contributor
Posts: 179
Joined: Fri Nov 19, 2010 2:07 am

Re: Is this possible?

Post by Neilos »

This can be done in a variety of ways; using $_POST variables, $_SESSION variables.

I would suggest using POST variables where you would construct a redirect on the texas page like;

http://www.yoursite.com/?from=texas
Post Reply