htaccess errordocument 404 and pass url to path
snippet in htaccess

htaccess errordocument 404 and pass url to path

user4217

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
Rewriterule ^(.*) /404.php?error_path=$1 [R=301,L]