----- Original Message ----
> From: Gaurav Kumar <kumargauravjuke...@gmail.com>
> To: php-general@lists.php.net
> Sent: Monday, September 21, 2009 12:54:30 AM
> Subject: [PHP] Best Practice to Create Dynamic URL's- With Username
> Hi All,
> I am creating a social networking website. I want that every user should
> have there own profile page with a static URL like-
> http://www.abcnetwork/user/username
> Where username will be dynamic userid or something else.
> This is something very similar to www.youtube.com/user/kumargauravmail (this
> is my profile page).
> So what should be the best practice to create such DYNAMIC URL's OR what
> kind of methodology youtube is following?
> Thanks in Advance.
> Gaurav Kumar
> OSWebstudio.com

Assuming the 'username' is from DB, look into URL rewrite. Thus, client see this


which translates into this  (or something similar) to PHP


Of course, you'll need to handle the 404 just in case ;)


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to