Virtual Domain Forwading using PHP

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
pbpillai
Forum Newbie
Posts: 1
Joined: Wed Nov 08, 2006 1:48 am

Virtual Domain Forwading using PHP

Post by pbpillai »

Hi Friends,

This time i need a help from u all..Let me tell u my need...

I have a site name http://www.example.com which allows several users to register and post there files. When the user registers, for ex: user "abc" registers, i want to give him an url "www.example.com/abc", so that he can view his home page

Now, when a user enter this url i want him to be redirected to
www.example.com/users/profiles.php?mem=abc

I know that if we go with .htaccess i can redirect using "RewriteRule". But i want to accomplish this using PHP itself so that my program will work for any servers and not restricted to APACHE.

hope to find a reply soon,

Thanks,
PB
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

The Zend Framework has a PHP rewrite router. I don't think it's documented yet though... let me see if I can dig up a tutorial....
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

search for mod_rewrite, we've discussed this plenty of times, and so has Google:wink:
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

jcart... he said he doesn't want to use mod_rewrite

pbpillai - this tutorial is a little out-dated, but it does mention the php-based rewrite router.
http://www.akrabat.com/wp-content/uploa ... ork_10.pdf

EDIT - looks like it is documented in the Zend Framework Manual as well...
http://framework.zend.com/manual/en/zen ... outer.html
Post Reply