开发者

Facebook user url system

开发者 https://www.devze.com 2023-04-01 14:39 出处:网络
In my project every user have his own page. But i wanna assign url to theese pages like in facebook: facebook.com/username. How does facebook开发者_Python百科\'s profile url system work? How to create

In my project every user have his own page. But i wanna assign url to theese pages like in facebook: facebook.com/username. How does facebook开发者_Python百科's profile url system work? How to create pages for user like in Facebook (domain.com/username)? Sorry for my bad english


Well you need to search after mod_rewrite it allows to rewrite URLS to another url like the facebook one.

More information on the apache site: http://httpd.apache.org/docs/current/mod/mod_rewrite.html


You need a .htaccess file with mod_rewrite rules (tutorial) that pushes those requests to a .php file. There you can look at the original request, and fetch the user details.

0

精彩评论

暂无评论...
验证码 换一张
取 消