在ASP.Net中实现动态URL重写的最佳方法是什么?

时间:2022-11-24 00:16:17

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

我目前正在使用Intelligencia.UrlRewriter有没有人有更好的建议?

5 个解决方案

#1


7  

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.

System.Web.Routing是.NET 3.5 SP1的一部分,您可以将它用于ASP.NET WebForm应用程序和MVC应用程序。

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

官方的ASP.NET站点在System.Web.Routing上有一个很好的QuickStart教程。

#2


3  

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

ISAPI_Rewrite也是一个很好的通用解决方案 - 不仅适用于ASP.NET,也适用于任何其他系统。

#3


2  

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!

另一种需要考虑的方法是URL路由。这与重写不同(重写涉及将一个URL更改为另一个URL,而路由涉及将动态URL直接映射到应用程序的不同部分),并且对于现有项目实现起来并不容易,但如果您要从您可能会发现这是一种更好的方法,具体取决于您的具体要求。另一方面,它可能对你没用,但至少你可以做出明智的决定!

#4


1  

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

根据Seb Nilsson提出的建议,我在谷歌上看了一下,发现了这些很好的例子:

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

使用IIS 6时,请务必查看此博客

#5


0  

IIS 7 comes with a rewrite module

IIS 7附带一个重写模块

You can find further links in this wikipedia article

您可以在此*文章中找到更多链接

#1


7  

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.

System.Web.Routing是.NET 3.5 SP1的一部分,您可以将它用于ASP.NET WebForm应用程序和MVC应用程序。

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

官方的ASP.NET站点在System.Web.Routing上有一个很好的QuickStart教程。

#2


3  

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

ISAPI_Rewrite也是一个很好的通用解决方案 - 不仅适用于ASP.NET,也适用于任何其他系统。

#3


2  

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!

另一种需要考虑的方法是URL路由。这与重写不同(重写涉及将一个URL更改为另一个URL,而路由涉及将动态URL直接映射到应用程序的不同部分),并且对于现有项目实现起来并不容易,但如果您要从您可能会发现这是一种更好的方法,具体取决于您的具体要求。另一方面,它可能对你没用,但至少你可以做出明智的决定!

#4


1  

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

根据Seb Nilsson提出的建议,我在谷歌上看了一下,发现了这些很好的例子:

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

使用IIS 6时,请务必查看此博客

#5


0  

IIS 7 comes with a rewrite module

IIS 7附带一个重写模块

You can find further links in this wikipedia article

您可以在此*文章中找到更多链接