简体   繁体   English

使用ISAPI_Rewrite 3在IIS 6中进行URL重写

[英]URL Rewriting in IIS 6 Using ISAPI_Rewrite 3

I am running into an issue where I am trying to implement SEO friendly links in an ASP.Net 3.5 application with IIS6. 我遇到一个问题,试图在带有IIS6的ASP.Net 3.5应用程序中实现SEO友好链接。 The issue is that when I try to use a url like "www.text.com/about/" it isn't directed to the ASP.Net pipeline, so I am unable to route the request to the correct physical aspx file. 问题是,当我尝试使用URL像“www.text.com/about/”它不是针对ASP.Net管道,所以我无法将请求路由到正确的物理aspx文件。 With ISAPI_Rewrite I know I can redirect a request to the specific page, but is there a way to have a request sent to the ASP.Net pipeline, so I can manipulate the request using the built-in routing engine. 使用ISAPI_Rewrite,我知道可以将请求重定向到特定页面,但是有一种方法可以将请求发送到ASP.Net管道,因此可以使用内置路由引擎来处理请求。 Any help is appreciated. 任何帮助表示赞赏。

Wade 韦德

Wade , 韦德

You can either implement urlmodule which extents ihttpmodule. 您可以实现扩展ihttpmodule的urlmodule。

or you can implement httphandler , You need to make this entry in httphandler section of web.config , so that each request comes to .net handler , you can customize your path there and rewrite the url 或者您可以实现httphandler,您需要在web.config的httphandler部分中创建此条目,以便每个请求都来自.net处理程序,您可以在那里自定义路径并重写url

let me know if you need any help. 让我知道您是否需要任何帮助。

as sample example 作为示例

http://www.aspnettutorials.com/tutorials/advanced/httphandler-aspnet2-csharp.aspx http://www.aspnettutorials.com/tutorials/advanced/httphandler-aspnet2-csharp.aspx

let me know if you need any help , i implemented recently 让我知道您是否需要任何帮助,我最近实施了

I found the technet article on how to route wildcard traffic to the asp.net pipeline. 我找到了有关如何将通配符流量路由到asp.net管道的technet文章。 Here is the link - http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true . 这是链接-http: //www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5c5ae5e0-f4f9-44b0-a743-f4c3a5ff68ec.mspx?mfr=true

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM