How to achieve nice litle USER page url like facebook or twitter?

佐手、 提交于 2019-12-11 09:14:49

问题


I have a .NET app and I let users to create their account.

Right now the user page looks like http:///user/?user=guru

I have a user subfolder at the app root and that is where the aspx pages for user page are

How can I let my users access their pages like twitter, facebook or youtube?

Their user profile\channel\account has this format: http://www.facebook.com/guru

This way the URL is short and easy to remember and share

Thanks


回答1:


This is called "url rewriting". You have some code that takes the original “facebook.com/guru” URL and coverts it into the “facebook.com/?user=guru” URL before the hosting application tries to process it.

Depending on your web server, there is probably a module already built that lets you do this. In IIS, you can either use a custom HttpModule or the URL rewriting module.



来源:https://stackoverflow.com/questions/3525232/how-to-achieve-nice-litle-user-page-url-like-facebook-or-twitter

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!