<p>I'm rebuilding a site with a lot of incoming links, and the URL structure is completely changing. I'm using the stock mod_rewrite solution to redirect all old links to new pages.
However, as I'm sure a few links will slip through the net, I've built a small script that runs on my custom 404 page, to log the incoming visitors' referrer URL. This will help me track down any broken links.</p>

<p>In addition to referrer, is there also a way of logging the url that the user entered, or clicked that caused a 404? I ask this as referrer is obviously a bit 'hit &amp; miss'.</p>

<p>I suspect not, but thought it worth a question.</p>

You might want to check out the
java.util.Arrays.deepEquals
and
java.util.Arrays.equals
methods.
I'm afraid the
```
equals
```
method for array objects performs a shallow comparison, and does not properly (at least for this case) compare the inner
```
Character
```
arrays.