username urls like twitter and facebook

后端 未结 4 934
心在旅途
心在旅途 2021-01-03 16:07

how does twitter and facebook etc. make unique url eg. twitter.com/billgates

if i would like to do the same (give my users unique urls with username), is it a appli

4条回答
  •  旧巷少年郎
    2021-01-03 16:19

    I'm not that familiar with CF, but the way Facebook does it (in affect) is have an Apache rewrite rule that redirects pages that match /text3423 to /profile.php?username=text3423 (not really, but that's the basic implementation.)

    Twitter uses the routing of Ruby on Rails, so really, there are no actually directories at all. It just maps /* to their user feed page.

提交回复
热议问题