Long Permalinks Can Cause A 404 Page Not Found Error

If you have the tendency to create long permalinks such as http://yourdomain.com/2008/01/20/britney-spears-sob-story-haunts
-us-again-and-again
, then it may be a problem. It may end up like http://yourdomain.com/2008/01/20/britney-spears-sob-story-haunts-us-again
-and-again

which will cause the following error:

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Add the following lines into your .htaccess file: -

RewriteRule ^post/([0-9]+)?/?([0-9]+)?/?$ /index.php?p=$1&page=$2 [QSA]

And voila, your problem is solved.

Popularity: 23% [?]