There was an existing site with a flat file structure with tons of urls with query strings galore. My issue is I wrote a CMS and have setup a custom error code page that uses a query string like:
ErrorDocument 404 /error.php?errorcode=404
The issue with this is if the old broken url has a query string this overwrites the query string in the errordocument redirct. For example if you do
www.example.com/missingpage.php - this will work and redirect to the 404 without issue.
But if you do
www.example.com/missingpage.php?anything=anything
or even
www.example.com/missingpage.php?
the errorcode=404 query string will not make it to the php page and it throws the generic message I have setup when the errorcode doesn't match. The problem is there are lots and lots of links with all kinds of crazy query strings so it is very hard to filter them out individually.
Has anyone ran into this issue before?