title: Disable aspxerrorpath parameter in ASP.Net URL
body: <p>I've added the following to my web.config to redirect a user to a custom error page instead of the default</p>
  
  <blockquote>
    <p>Server Error in '/' Application.</p>
  </blockquote>
  
  <p>error message.</p>
  
  <p>The user get's redirected to <code>error.html?aspxerrorpath=/paymentservices.svc</code></p>
  
  <p>Is there a way to remove the <code>?aspxerrorpath=/paymentservices.svc</code> part?</p>
  
  <p><strong>web.config:</strong></p>
  
  <pre><code>&lt;system.web&gt;
      &lt;customErrors defaultRedirect="~/ErrorPages/error.html"
    mode="On" xdt:Transform="Replace"&gt;
      &lt;error statusCode="500" redirect="~/ErrorPages/error.html"/&gt;
      &lt;error statusCode="404" redirect="~/ErrorPages/error.html"/&gt;
      &lt;/customErrors&gt;
  &lt;/system.web&gt;
  </code></pre>