HEllo. I need replace double slashes in one slash. I am planning do this in Global.asax Application_BeginRequest event. Is it enough? or better do a http module? Thank you.
UPD
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires at the beginning of each request
Thread.CurrentThread.CurrentCulture = New Globalization.CultureInfo(AppSettings.UsedCulture)
Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture
Dim retUrl As String
....
some code
....
'Dim app As HttpApplication = CType(sender, HttpApplication)
'app.Context.RewritePath(retUrl)
Dim myContext As HttpContext = HttpContext.Current
'Rewrite the internal path
myContext.RewritePath(retUrl)
End If
I am using .Net 1.1. And It must be on .Net 1.1 RewritePath does not rewrite URL.Why?
UPD2 Having decided to make addition redirect in Sub Application_BeginRequest with new rewritting url.