I'm using a simple .htaccess file to use a custom 404 error page:
ErrorDocument 404 /errors/404.php
Inside this 'errors' folder, there is the 404.php file, and an image, which I want to include in the 404 page.
Anyway, when I request a non-existing page from the root folder, everything works fine. When I request something like adfag/sdgsdg/sdg/sdg the image at the error page is not showing. I'm using the relative URL in the <img> tag (so, the filename itself, because the 404 page and the image are both in the same directory) but it seems like the 404 page is requested from another location (a few levels down into the non-existing directories).
I assume there should be a small PHP script that takes the requested URL, and generates the relative path to the image in order to let the error page work properly. Any ideas?
Thanks in advance.
(I know that the absolute path starting with http:// works, but I'd rather use the relative path)