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’
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.
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.
S.K
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