title: to rewrite url in Global.asax, ASP.NET
body: <p>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. </p>
  
  <hr>
  
  <p><strong>UPD</strong></p>
  
  <pre><code>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
  </code></pre>
  
  <p>I am using .Net 1.1. And It must be on .Net 1.1
  RewritePath does not rewrite URL.Why?</p>
  
  <p><strong>UPD2</strong>
  Having decided to make addition redirect in Sub Application_BeginRequest with new rewritting url.</p>