My System’s Set-up:
FreeBSD 5.4
Apache 1.3.34
PHP 4.4.2
WordPress 2.0
Next, I’ll point to several related threads in this forum.
Related Threads:
404 Not Working Properly
WordPress Steals 404
WP 2.0 messed up my permalinks
Next, I’ll go into the steps I’ve taken so far to try to debug this issue.
Bugs Have Been Filed
It appears that several bugs have already been filed on this issue.
Ticket #2651 (reopened): 404.php not implemented with different permalink structure – filed by sluggo on April 9th, 2006
Ticket #2376: Custom 404 page error/conflict with permalinks – filed by vsa on Feb. 2nd, 2006
Hopefully a resolution will come out of these soon. In the meantime, I’ll keep digging away at the code. And if you have any insights, I’d greatly appreciate them! Thanks!
To Reproduce this Bug:
[snip]
For the record, that only works on a small number of hosts. It works fine on most servers, including all of mine and my friends. π
No, I’m not saying that this isn’t a problem, I’m just saying it’s something that your host has done.
Examples:
http://www.viper007bond.com/archives/2006/03/11/wordpress-v202-released/
http://www.viper007bond.com/this/is/a/fake/url/
Interesting. I wonder what it is that my host has doing that’s different than your host.
So I compared the response headers from my server to your server, and here’s what I found:
Mine:
404 OK
Yours:
404 Not Found
Another user just posted this thread a few hours ago with the same issue. I looked at his response headers and saw this:
404 OK
To do one more comparison, I went to http://wordpress.org/404 to throw a 404 error on this machine. Also received a:
404 Not Found
I see a bit of a pattern here. Seems that my server isn’t throwing a correct 404 header. That would explain why an ErrorDocument 404
isn’t working.
And furthermore, this is only the case when I have these rules in my .htaccess file:
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php
When I remove these rules, my 404 header works as it should.
So why are these rules causing my 404 header to foul up? Hmmm…
FWIW – “404 OK” is fine. The text after the code is just for humans. The 404 is the only part a machine should be trying to interpret.
Ah, thanks for the info, phord.
So the prevailing assumption is that this may be caused by a particular Apache configuration set by my host, which is not playing nice with my WordPress installation. I’ll send a note to my hosting provider to see if they have any insights.
Solved!
My sysadmin looked into the problem, did some research, and discovered that FastCGI was causing the problem.
The solution has already been documented here on this forum, in the thread problems running under php/fastcgi.
Big thanks to everyone here who helped out! And much thanks to my brilliant sysadmin!
I have the same your problem, but your solution didn’t works for me…
i’ve updated the functions.php file with the new 4 lines but the problem remains… 404 not found.
i’ve also posted my problem here… please help
http://wordpress.org/support/topic/73642?replies=1
I have a similar problem, but I don’t get 404.php under the default setting or with custom permalinks. What I have discovered is that the problem seems related to PHP running under cgi.
I’ve tested this on a host with apache running mod_php and evrything works as expected, 404.php is shown for non-existent URLs, but not on my other webspace that uses PHP/cgi.
See my original comments at:
http://wordpress.org/support/topic/67416
makesure the content exsists. eg. if you have a category called COMPUTERS but no posts in it. Sometime w/ permalinks you will get 404 errors
Hello,
I would like to thank everyone for these nice solutions, I faced the same problem but finally I solve it out.
make sure you write the codes manually in .htaccess OR give it 777 to work auto with your cpanel changes..
—–
wslaat
http://www.wslaat.com