How can I determine the url of a 'page not found' if redirecting elsewhere using .htaccess
I'm using the following line in .htaccess files on domains I own, to redirect error traffic to another domain I own:
ErrorDocument 404 http://mydomain.com
But how can I get the url of the 'page not found' so I can log it at mydomain.com?
I know I could use a local file as the error page, and redirect with php header to mydomain.com and get the referer, but I would much rather use .htaccess if possible.
Can it be done with .htaccess and if so how?
PS. I've tried using php to get the referer, but it returns the page before t开发者_如何学Che page not found, which is not what I'm after.
Many thanks
精彩评论