Web Hosting
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Reply To: How to return 404 instead of redirecting to homepage

Discussion in 'Misc WordPress Requests' started by johns2017, Nov 22, 2017.

  1. johns2017

    Guest

    Reply To: How to return 404 instead of redirecting to homepage, by johns2017

    Yes, I’m using the default twentyseventeen theme which has a 404.php

    The problem is that the themes 404 is only shown for some URIs and not all paths.

    I’m using permalinks in this structure:

    /blog/%postname%/

    If I browse to domain.com/blog/somerandomurl then WordPress correctly shows a 404 page using the templates 404.php.

    However if I browse to any other path such as domain.com/somedirectory/ or domain.com/notblog then WordPress does a 301 redirect to the top level domain instead of showing the themes 404.

    How do I configure WordPress to always show the themes 404 page instead of doing a redirect?

    Reply To: How to return 404 instead of redirecting to homepage
     
    #1

Share This Page

Web Hosting