title: How to ignore URL routing for subdirectories ASP.NET 4.0
body: <p>i am routing company names to the their pages with URL routing .NET 4.0</p>
  
  <p><strong>www.xyz.com/companyname</strong> it works good, but i dont want to route if the page like this</p>
  
  <p><strong>www.xyz.com/Pages/Company/Products.aspx?id=123</strong> i want to ignore if url start with <strong>"Pages"</strong></p>
  
  <pre><code>    void RegisterRoutes(RouteCollection routes)
      {
          routes.Ignore("~/Pages/"); // i tried this but did not work
  
          routes.Ignore("{resource}.axd/{*pathInfo}");
          routes.Ignore("");
          routes.MapPageRoute(
             "Bayi Sayfa",               
             "{*BayiName}",  
             "~/Pages/HomePage/Default.aspx" 
          );
      }
  </code></pre>
  
  <p>also i tried this </p>
  
  <pre><code>routes.Ignore("Pages/");
  </code></pre>
  
  <p>but this is also not working</p>