First of all, my ErrorDocument 404 /v1 is never redirecting, but if I look in the Chrome Inspector, I really have a 404 error. At first I thought it was because I really needed to specify a file ex: error.html, but that didn't work either. /v1 is just a wordpress subdomain, and I want to redirect all of my errors there. /v1 falls on my homepage of my subdomain.
Also I would like to make the error page dynamic, but I can't figure how to do that. Something like that:
RewriteCond %{REQUEST_FILENAME} public_html/(.*)
ErrorDocument 404 /v1/%1
Any ideas? Thank you!!
You're goinmg to need to return the 404 through a php script:
And in the
404.php file
:Or you could lose the
?path=$1
part completely and just look in$_SERVER['REQUEST_URI']
.