ASP.NET URL Rewriting

后端 未结 3 1252

How do I rewrite URL\'s in ASP.NET?

I would like users to be able to goto http://www.website.com/users/smith instead of http://www.website.c

3条回答
  •  情话喂你
    2020-11-30 04:21

    I have used an httpmodule for url rewriting from www.urlrewriting.net with great success (albeit I believe a much earlier, simpler version)

    If you have very few actual rewriting rules then url mappings built in to .NET 2.0 are probably an easier option, there are a few write ups of these on the web, the 4guysfromrolla one seems fairly exhaustive but as you can see they don't support regular expression mappings are are as such rendered fairly useless in a dynamic environment (assuming "smith" in your example is not a special case then these would be of no use)

提交回复
热议问题