What is the best method to achieve dynamic URL Rewriting in ASP.Net?

大兔子大兔子 提交于 2020-01-12 03:55:52

问题


I'm currently using Intelligencia.UrlRewriter does anyone have better suggestions?


回答1:


System.Web.Routing is part of .NET 3.5 SP1 and you can use it both for your ASP.NET WebForm-application and your MVC-application.

The official ASP.NET site has a good QuickStart Tutorial on System.Web.Routing.




回答2:


ISAPI_Rewrite is also a good generic solution - works not only with ASP.NET but with any other system.




回答3:


An alternative approach to consider is URL routing. This is not the same as rewriting (rewriting involves changing one URL to another whilst routing involves directly mapping dynamic URLs to different parts of your application) and is not so easy to implement for an existing project, but if you're starting a project from scratch you might find this a better approach depending on your exact requirements. On the other hand, it may be no use to you at all, but at least you can make an informed decision!




回答4:


Following the suggestion made by Seb Nilsson I looked a bit all over google and found these nice examples:

  • aspnet routing goodbye url rewriting
  • using asp.net routing independent of mvc
  • using asp.net routing independent of mvc passing-parameters

When working with IIS 6 it is important to have a look at this Blog




回答5:


IIS 7 comes with a rewrite module

You can find further links in this wikipedia article



来源:https://stackoverflow.com/questions/125826/what-is-the-best-method-to-achieve-dynamic-url-rewriting-in-asp-net

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