For some reason, when you add parameters to any page of my site, it shows the page. I'd like it to 404. How do I do this?
example...
http://www.mysite.com/?test=whatever
that should 404 as it's not a valid url, but it shows mysite just fine.
same with
http://www.mysite.com/mypage/?test=whatever
That shows the page.
thanks marc
Dijkgraaf
1:50 am on Jul 27, 2010 (gmt 0)
One solution would be something in your PHP to check that there is a query string ($_SERVER['QUERY_STRING']) and if there when you don't expect one give a response of 403 (Forbidden). A 403 response is better than a 404 as it tell the requester not to try it again.
flicky
2:19 am on Jul 27, 2010 (gmt 0)
But this isn't related to any php script... my server just won't ignore parameters added to the end of any URL... those parameters should be seen as foreign and return 404.