4

I had always thought that placing anything spurious after the 404 which the server didn't understand would result in a 404; however I had a closer look at a WordPress site which I was building and noticed that if I appended something like /?page_iid=1 ( note the ? and also the typo ) to the domain that the redirect went to the site's home page rather than the 404 page. At first I thought this was just WordPress; but evidently it's unilateral across the web. Presumably this is a well known and easily explainable fact which has eluded me for years, but could someone kindly explain it to me. I am a little perturbed that the 404 system isn't able to handle a typo after a '?' so I presume it's unavoidable but if it isn't then I'd like to know a way of sorting it out.

8

What you're seeing is normal behavior. What you're doing is appending a query string to the home page. If the home page exists, and it always does, it will receive the parameters of the querystring. Now whether or not it uses them or not is up to the page itself. Most pages not expecting a query string will just completely ignore it and display the page normally.

2

This is quite normal. The main page displays the content of id=1. If you state an id that does not exist (e.g. id=383893939), it will show the default index page. This behavior is defined in the php code treating $_GET.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.