I have 40+ posts on my blog. Only one of them is going to a 404 page when I click the title (visit the permalink).
To see it in action: http://thegrovestead.com/tag/strawberries/
Look for the post "Cure for the common slug" and click the title (permalink: http://thegrovestead.com/cure-for-the-common-slug/)
You will get the 404 error. Note that all the other posts on that page will display the single post fine.
My htaccess is clean:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
I've disabled all the plugins. I've tried deleting and recreating the post, still getting the 404 error. If I modify the slug by one letter, it works. But the specific permalink above does not work.
There must be an explanation. Any advice?
var_dump($wp_query);
to your 404 template to get a clue as to why it's not finding the post, this will show you the SQL query being sent to the database and may provide a hint. also make sure the trash is empty for posts and pages, that's a long shot though.