here is the code in the global.asax file
Protected Sub Application_BeginRe开发者_如何学编程quest(ByVal sender As Object, ByVal e As System.EventArgs)
If LCase(Request.Path).Contains("/dir/") Then
Dim M As Match = Regex.Match(Request.Path, "/dir/(\w*)/", RegexOptions.IgnoreCase)
If M.Success Then
Response.Redirect("https://[mystore]/select.aspx?route=" & M.Groups(1).Value)
End If
End If
End Sub
I can run it out of VS2008 without any issues but when i deploy the project to the server running IIS 6 it will not redirect the request.
IIS 6 will not support this functionallity so you will need to impliment an ISAPI module to do it for you. In IIS 7 this would work fine.
Here is the module that I used: http://www.isapirewrite.com/
I would just debug the application by attaching to the process running your site, then do a soft reset.
I would guess the logic is somehow not doing the same thing on the two different environments, but you won't be able to tell unless you debug it.
精彩评论