Re: Best Practice to Create Dynamic URL's- With Username

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



----- Original Message ----
> From: Gaurav Kumar <kumargauravjukebox@xxxxxxxxx>
> To: php-general@xxxxxxxxxxxxx
> Sent: Monday, September 21, 2009 12:54:30 AM
> Subject:  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

http://www.abcnetwork/user/username

which translates into this  (or something similar) to PHP

http://www.abcnetwork/userProfile.php?user=username

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

Regards,
Tommy


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux