1

We have a site whose blog url looks like www.domain-name.com/blog. The blog archive pages have urls like www.domain-name.com/blog/page/1, www.domain-name.com/blog/page/2 etc... These are displayed properly. However, when I type a url such as www.domain-name.com/page/1 or www.domain-name.com/page/2, which are non-existent urls, I get redirected to the blog home page instead of getting a 404. I do not want the 404 suppression to happen. What can I do to get a 404 for non-existent wordpress pages?

I have the same issue with a querystring url that looks like www.domain-name.com/blog/?xyz. Although no such page exists, wordpress suppresses the 404 error and displays the blog home page. How can I circumvent this default behaviour of Wordpress and make it display the 404 page for such urls? Thanks!

3
  • 1
    do you have a 404.php file in your theme's directory?
    – birgire
    Commented Sep 10, 2013 at 9:49
  • Thank you for your response. Yes, I do. There is a 404.php in the themes directory. The 404 page shows up for non existent blog urls. Its only when the url has "/page/" in it that the 404 gets suppressed even when the page does not exist.
    – Sripriya S
    Commented Sep 11, 2013 at 5:35
  • Sounds very like the issue as described here: wordpress.stackexchange.com/questions/46116/….
    – joesk
    Commented Sep 11, 2014 at 12:31

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.