I have a custom error page that is just HTML/CSS and some JS that will take the query string (?error=404 for example) and display dynamic content based on that query string, with a generic fallback if none is supplied. I want this query string to be passed by the .htaccess ErrorDocument redirect but unfortunately it does not.
ErrorDocument 404 /error.html?error=404
This displays the generic error page as I assume it is truncating the query string. It does return a 404 status however, which is what I need.
I could obviously redirect to the absolute URL and maintain the query string but then I'd get a 200 header, which is no good!
Any help would be much appreciated!