title: AspxErrorPath in Custom Error Page
body: <p>We currently has a page that is used to display a generic error message when errors occur on our website. It has no functionality at all other than displaying a label that mentions there was an error.</p>
  
  <p>Here is my issue, our client has ran a security review and tells us our error page contains phishing due to the URL in the query string, now I don't consider this a problem, but to put an end to the question, I'd like to remove the query string.</p>
  
  <p>My web.config entry is this:</p>
  
  <pre><code>&lt;customErrors mode="On" defaultRedirect="~/DefaultErrorPage.aspx"&gt;
  &lt;/customErrors&gt;
  </code></pre>
  
  <p>When an error occurs, it goes to <strong>DefaultErrorPage.aspx?aspxerrorpath=/Website1/LastPage.aspx</strong></p>
  
  <p>How can I prevent this? However, I could just redirect to the page if it contains the query, but I'm more looking for a way to prevent the query string instead of an extra redirection.</p>