[CentOS] [OT] Apache oddity - appending garbage request does not result in a 404

Wed Jul 20 11:46:34 UTC 2011
Ray Leventhal <centos at swhi.net>

On 7/19/2011 4:47 PM, John R Pierce wrote:
> On 07/19/11 1:28 PM, Ray Leventhal wrote:
>> Example:http://www.domain.com/pagedoesnotexist  returns the expected 404
>>
>> But browse to a page that does exist, like goodpage.php, then append
>> either a slash and some random string, or a ?=somerandomstring and the
>> goodpage.php is still displayed.
>>
>> I'll gladly provide more info, if needed.  Any pointers on where to look
>> would be truly appreciated.
>
> your php page should examine the arguments and if there's anythign there
> unexpected, it should force the 404 via
>
>       {
>           header ('Location: '.$newReq);
>           header ('HTTP/1.0 404 Page Not Found');
>           die;  // Don't send any more output.
>       }
>
> or whatever...
>
>
Much obliged.  I figured I could cure it with php, but was wondering if 
apache was somehow mis-configured.

Thanks for the help!
-Ray