0

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.

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 & miss'.

I suspect not, but thought it worth a question.

4

2 回答 2

1

You could determine from the logs what happened a short time earlier for that user. The referrer alone may not always put you into the right context.

于 2008-10-14T08:45:01.260 回答
1

You could maintain your old virtual folder structure during a transition period and put redirect pages in place to the new content. If the structure is changing very radically so that is not possible then you basically don't have enough information from the old URL's to direct them.

于 2008-10-14T08:48:55.793 回答