[wp-forums] Weird - 200 returned on bad url

Otto otto at ottodestruct.com
Wed Jun 13 12:40:38 UTC 2012


On Wed, Jun 13, 2012 at 6:49 AM, esmi at quirm dot net <esmi at quirm.net> wrote:
> on 13/06/2012 11:42 Simon Prosser said the following:
>>
>> Same reasonhttp://domain/?apples=green  is a 200, if the variable
>>
>> doesnt exist the root page is just returned.
>
>
> So it just strips off the query variable? That would explain why
> http://domain/2008/09/04/?apples=green returns http://domain/2008/09/04/

Not exactly.

A query variable that isn't being used.. well.. isn't being used. You
have to actually attempt to use query variables to know they're there.

In the code, calling http://example.com/?abc=123 will set the
$_GET['abc'] = '123', but if I'm not looking at the $_GET['abc']
variable, then it doesn't make any difference what it is.

It's not stripping off the query variable, it's just looking for the
query variables that it's looking for, and "fedd", "apples", and "abc"
aren't in the list of variables being used.

-Otto


More information about the wp-forums mailing list