title: How to ignore some route while using ASP.NET Friendly URLs?
body: <p>I am using ASP.NET Friendly URLs with success, but I need to ignore route for a particular <code>Foo.aspx</code> page (because this page needs POST data and once re-routed the POST data is not available anymore in <code>Page_Load()</code>!).</p>
  
  <p>It looks like using ASP.NET Friendly URLs discard any attempt to ignore a route. Even the <a href="http://msdn.microsoft.com/en-us/library/dd992982(v=vs.110).aspx">MSDN example</a> for ignoring route doesn't work once ASP.NET Friendly URLs routing is used:</p>
  
  <pre><code>routes.Ignore("{*allaspx}", new {allaspx=@".*\.aspx(/.*)?"});
  </code></pre>
  
  <p>And to ignore route to <code>Foo.aspx</code> the code should look like that, isn't it?</p>
  
  <pre><code>routes.Ignore("{*fooaspx}", new { fooaspx = @"(.*/)?foo.aspx(/.*)?" });
  </code></pre>
  
  <p>The <code>Global.asax</code> code looks like:</p>
  
  <pre><code>public static void RegisterRoutes(RouteCollection routes) {
  
      // This doesn't work whether I put this code before or after ASP.NET Friendly URLs code.
      routes.Ignore("{*allaspx}", new { allaspx = @".*\.aspx(/.*)?" });
  
      routes.Canonicalize().Lowercase();
  
      var settings = new FriendlyUrlSettings();
      settings.AutoRedirectMode = RedirectMode.Permanent;   
      routes.EnableFriendlyUrls(settings);
  }
  
  void Application_Start(object sender, EventArgs e) {
     RegisterRoutes(RouteTable.Routes);
  }
  </code></pre>
  
  <p>This question <a href="https://aspnetfriendlyurls.codeplex.com/workitem/13">has been asked on the ASP.NET Friendly URLs codeplex site</a>, but didn't get an answer.</p>
  
  <p>Thanks for your help on this :)</p>