Addon Domain Question, hope php code can help.

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
zhuxia
Forum Newbie
Posts: 1
Joined: Thu Jul 13, 2006 1:55 pm

Addon Domain Question, hope php code can help.

Post by zhuxia »

For example:
I have 2 domains host in one account, main domain http://www.one.com and addon domain http://www.two.com. I cre8 one folder call "two" and a subdomain ( two.one.com) for http://www.two.com. So when I login to http://www.two.com or two.one.com , the server will redirect me to http://www.one.com/two/ and address bar of the web browser show "www.one.com/two/" too.

1. Now my question is can I use php code to hide "www.one.com/two" and display "www.two.com" on the address bar?

2. My main page put in abc folder so the address bar will display "www.one.com/abc/", can I use php code to make it become "www.one.com"?

Thank You
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

mod_rewrite. Set up some rewrite rules to do what you want. It can be done in a snap.
Post Reply