How can I pass the 404\'d URL to my 404.html page using .htaccess
.htaccess
For example, if I visit an invalid page: /user/123
/user/123
RewriteEng
On apache 2.4 and later, you can use mod-rewrite variables with ErrorDocument directive :
ErrorDocument 404 /404.php?uri=%{REQUEST_URI}
This will internally send the 404 uri to your 404.php page and you can manipulate it using the following code in 404.php