• Resolved Andrrew

    (@andrrew)


    URL /?p=x ,where x is any non-numeric string, results in index.php showing all posts.

    I would prefer it to show my home page (static) or a 404 page as I filter the content depending on user and don’t want to show all to all and sundry.

    If the url is for a page not found e.g. /?p=12345678 then response is correctly a 404. However any other /?p=[something] results in index.php showing all posts.

    I am not using permalinks.

    Is this a bug or a feature? If a feature, is there a work-around?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    If it starts with a number it goes to 404. If not it goes back to index.php… Interesting.

    Thread Starter Andrrew

    (@andrrew)

    Yes, interesting. I presume this is a core decision, that I don’t want to mess with.

    Nope, I’ve found the answer: I changed the static home page (page-2) template from ‘page-2.php’ to ‘home.php’, changed the template link, and now all’s well.

    Thanks Ipstenu, for providing unfathomably unconnected inspiration.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘invalid page query shows index page instead of 404 or home page’ is closed to new replies.