The first problem is solved, the second one remains: Added in 404.php: echo $_SERVER["HTTP_REFERER"]; however, echo does not output anything.
How to get the address of a non-existent file to display it at 404.php?
Content .htaccess :
# ErrorDocument 404 /404.html # DirectoryIndex index.php index.html # Options -Indexes
ErrorDocument 403 /404.htmlfor example works - Alexan-Dwer