Error 404 Pages : <p>I want to set up a broken link reporting in my custom 404 page. I want to make the document a php page, so I can capture and send the url that was requested, to my email. I have some very basic php code in it so far to send the email, so I got that. The problem is, how to I make the 404 page apear on the actual broken link page, not redirect it to the 404 page. E.g. You see Google's website has it to where if you find a broken link like this (<a href="https://www.google.com/asdfasdfasdfasdfasdf" rel="nofollow">https://www.google.com/asdfasdfasdfasdfasdf</a>) then it stays on that same page and echos the requested uri. How do they do that? I just use the .htaccess method like </p>

<blockquote>
  <p><code>ErrorDocument 404 http://mydomain.domain/404</code></p>
</blockquote>

<p>But this redirects the 404 page to there. How do I make the 404 apear on the actual broken link page (non-existing page)?</p>
