Forum Moderators: open
Basically, I have a Wordpress blog in a subdirectory of my site (have done for years). I have just upgraded to 2.5.1 and have just noticed a problem.
Basically, if you try and load a page that does not exist, rather than returning the usual 404 response, I get nothing - NO header response at all, just a blank page?!?
My permalink structure is /%postname%/ and in my htaccess I have:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress
Can anyone here help?
Your mod_rewrite code says:
IF the requested URL does not resolve to an existing file
AND
IF the requested URL does not resolve to an existing directory (or folder, if you prefer)
THEN
Rewrite the request to WordPress at /blog/index.php
Therefore, if you request a non-existent page, the request will be sent to WordPress, and it is up to WordPress to determine whether or not that page exists and to handle it properly.
Evidently, WP is not handling it properly (at least not on your installation). I don't mess with WP, so there may be some option you can set somewhere that causes it to check for invalid "WP post" requests and to return a 404 if needed -- I don't know.
Jim
If you are getting an absolute blank page, that to me sounds like you have a PHP error and you have error reporting off or WP does its own error handling and displays nothing. Unfortunately, WP has no system log so it doesn't tell you what errors might happen (only on plugin activation).
Do you have any plugins that fire on 404? Try disabling all your plugins and requesting a non-existent page.