Change DNS to point to a php file - How to handle

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
cohq82
Forum Commoner
Posts: 43
Joined: Mon Apr 21, 2008 8:38 pm

Change DNS to point to a php file - How to handle

Post by cohq82 »

I have domain name http://www.xxxx.com hosted on Host A and domain name http://www.yyyy.com or http://www.zzzz.com etc...

I would like to change the DNS for http://www.yyyy.com or http://www.zzzz.com etc... to point to Host A. How can I capture the event in Host A so that I know which url it coming from to render different page? For example, if http://www.xxxx.com, I render index.php
But if http://www.yyyy.com, I render index.php?para=1 or coming from http://www.zzzz.com go to index.php?para=2. But the URL in FF or IE still show the domain name where it comes from.

Please advise.

Thanks
User avatar
phpserver
Forum Newbie
Posts: 22
Joined: Mon Oct 20, 2008 2:59 am
Location: Eastleigh,Nairobi

Re: Change DNS to point to a php file - How to handle

Post by phpserver »

cohq82 wrote:I have domain name http://www.xxxx.com hosted on Host A and domain name http://www.yyyy.com or http://www.zzzz.com etc...

I would like to change the DNS for http://www.yyyy.com or http://www.zzzz.com etc... to point to Host A. How can I capture the event in Host A so that I know which url it coming from to render different page? For example, if http://www.xxxx.com, I render index.php
But if http://www.yyyy.com, I render index.php?para=1 or coming from http://www.zzzz.com go to index.php?para=2. But the URL in FF or IE still show the domain name where it comes from.

Please advise.

Thanks
That has more to do with mosredirect as used in joomla cms.I have searched everywhere for it and the search continues.Once i have it,i will share it with you.
User avatar
phpserver
Forum Newbie
Posts: 22
Joined: Mon Oct 20, 2008 2:59 am
Location: Eastleigh,Nairobi

Re: Change DNS to point to a php file - How to handle

Post by phpserver »

cohq82 wrote:I have domain name http://www.xxxx.com hosted on Host A and domain name http://www.yyyy.com or http://www.zzzz.com etc...

I would like to change the DNS for http://www.yyyy.com or http://www.zzzz.com etc... to point to Host A. How can I capture the event in Host A so that I know which url it coming from to render different page? For example, if http://www.xxxx.com, I render index.php
But if http://www.yyyy.com, I render index.php?para=1 or coming from http://www.zzzz.com go to index.php?para=2. But the URL in FF or IE still show the domain name where it comes from.

Please advise.

Thanks
Visit http://codeigniter.com/user_guide/general/routing.html and get help here.
cohq82
Forum Commoner
Posts: 43
Joined: Mon Apr 21, 2008 8:38 pm

Re: Change DNS to point to a php file - How to handle

Post by cohq82 »

http://codeigniter.com/user_guide/general/routing.html doesn't work for me because it only changes the URI not the base URL which is the http://www.website.com part

Is there a solution for this? I wonder how to handle different requests from different domain pointing to a server and a php will take that and route to different page.

The goal is to have a cosmetic effect where the url is totally different instead of http://www.aaaa.com/xxx but like http://www.xxx.com

Thanks
Post Reply