title: wordpress 404 not working properly
body: <p>I have a Wordpress site with permalinks set to /%category%/%postname%.html. When I visit to a non-existing page, let say, example.com/non-existing-post, Wordpress 301-redirects to homepage instead of showing the 404.php page, which is inside the theme's package. Below is the htaccess code;</p>
  
  <pre><code>AuthName "protect"
  AuthUserFile "/home/sitename/.htpasswds/public_html/passwd"
  suPHP_ConfigPath /home/sitename/public_html/
  # BEGIN WordPress
  &lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteRule ^index\.php$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule . /index.php [L]
  &lt;/IfModule&gt;
  
  # END WordPress
  </code></pre>
  
  <p>When I tried to disable custom permalink structures, it returns a error 404 but not with 404.php page that I preferred(normal Apache error, I guess).</p>
  
  <p>There have been a lot of similar discussions about this "bug", please see the links below. All of them not seem to be resolved. :(</p>
  
  <p><a href="http://wordpress.org/support/topic/404-pages-not-working-1" rel="nofollow">http://wordpress.org/support/topic/404-pages-not-working-1</a></p>
  
  <p><a href="http://wordpress.org/support/topic/404-pages-not-working" rel="nofollow">http://wordpress.org/support/topic/404-pages-not-working</a></p>
  
  <p>What's causing Wordpress automatically 301-redirect a page that is supposed to show 404 error?</p>
  
  <p>UPDATE(Feb 21, 2013) - Problem's still persistent. I think it's a bug in the wordpress core that involves in "pretty permalinks" redirections.</p>
  
  <p>Still I'd like to solve this problem since I've got a handful of Wordpress sites that have this and I think other people are experiencing the same bug in their sites.</p>