Page 1 of 1

Virtual Domain Forwading using PHP

Posted: Wed Nov 08, 2006 2:27 am
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

Posted: Wed Nov 08, 2006 2:30 am
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....

Posted: Wed Nov 08, 2006 2:32 am
by John Cartwright
search for mod_rewrite, we've discussed this plenty of times, and so has Google:wink:

Posted: Wed Nov 08, 2006 2:35 am
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