开发者

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

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


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.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜