问题
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