Support » How-To and Troubleshooting » WordPress (or something) not generating 404’s

WordPress (or something) not generating 404’s

  • Apologies, but I just don’t know where to post this (involves two different apps)

    WordPress 2.8.4
    Litespeed 4.0.9
    URL: http://www.thelake.me

    Problem: Whenever I type a non-existent URL on my blog I get the following text & according to Google Apps also get a 200 response rather than a 404

    Sorry, no posts matched your criteria.

    I’ve tried setting a custom error page in Litespeed but it’s not being used, & I’ve no idea what’s generating the posted text so don’t know where to investigate further.

    Thanks for looking

Viewing 8 replies - 1 through 8 (of 8 total)
  • esmi


    Forum Moderator

    Thanks for the reply,

    I already have a (modified) 404.php shipped with the theme I use but WordPress isn’t using it (according to these snippets from your link it should be)

    As I stated in my 1st post, all I get is ‘Sorry, no posts matched your criteria.’ with a 200 reponse rather than a 404 (no idea what’s generating that text).

    ‘When a user clicks on a link to a missing page, the web server will send the user an error message such as 404 Not Found’

    ‘The normal 404.php page shipped with your Theme will work’



    Forum Moderator

    Have a look at index.php and see if there’s anything between the <?php else : ?> and the <?php endif; ?> near the bottom of the file.

    Ah!! we’re getting somewhere, found this in the index.php of my theme –

    <?php _e(‘Sorry, no posts matched your criteria.’); ?>

    That explains where the text is being generated, I guess I should rewrite that line to call the 404.php page, but I’ve no idea how.



    Forum Moderator

    Try taking just that line out.

    Well I think I’ll have to mark this as unresolveable. Taking that line out just produces a blank area instead of that line.

    I’ve set a custome error page in Litespeed, but I guess if I can’t get WordPress to generate 404’s, that will never be used.

    Check up if any 404 page is specified in the .htaccess file.


    I don’t use a .htaccess file but I have got the following at the top of my rewrite rules in the Litespeed virtual server serving the site

    ErrorDocument 404/index.php?error=404?

    I’ve also got a custom 404 page set up in Litespeed pointing to my custom 404.php page

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress (or something) not generating 404’s’ is closed to new replies.