Add the referer information that could help you findout where's the link comes from

It's very difficult to find out where's the bad link coming from. So It's better to add the referer infomation on not found page.