- Open global.asax (or if it doesn't exist, create it. global.asax should reside in the web application root)
- In the function Application_BeginRequest, add the code from my first code block above (Again, if the function doesn't exist, create it. Here's a template: )
Code:
Public Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
' Code goes here...
End Sub
- At this point, the variable RequestedPath will hold the value of the path that was initially requested, for example "/1500.aspx"
- You then need some code to work out where that path should actually be going. That's up to you.
- Then you just need to use CurrentHTTP.RewritePath( NewPath) replacing NewPath with whatever you worked out the new path to be.
|