404 Error! After Submitting a Comment on a Wordpress Blog

2009 October 2
by Aaron

 404_page_not_found

Recently a reader of this blog contacted me to inform that he got the infamous 404 page not found error after submitting a comment on my blog. When I tried to leave a test comment on my blog, I encountered the same problem. My blog was running on Wordpress 2.6 and was recently upgraded to 2.8.4. So, did the upgrade cause the problem? Yes it did!

After submitting a comment, Wordpress (2.8.4) was trying to lead me to the following page:

http://techthinker.com/dropbox-an-easy-way-to-sync-and-share-files/comment-page-1/#comment-1622

So let’s dissect the above URL to see what is the problem.

http://techthinker.com refers to my blog’s domain.

dropbox-an-easy-way-to-sync-and-share-files is the name of my blog post.

#comment-1622 is the position within the post page where your new comment will appear.

So what is comment-page-1/ ? This is an erroneous text inserted by Wordpress.This text is inserted by the Wordpress Comments Pagination feature that allows comments to be grouped into pages.

How to fix this problem?

The most simple fix for this problem is to turn off the Comments Pagination feature in Wordpress.

To do this open up Wordpress Admin and choose Settings –> Discussion and then un-tick the checkbox Break comments into pages …

Another way to fix this problem is to modify your .htaccess file. The .htaccess file is available in the root directory of your website. Simply edit this file to have the following setting

RewriteRule ^(.*)/comment-page-1/ $1/ [R=301,L]

By doing the above change in your .htaccess file any request to the above erroneous URL will be permanently redirected to the correct URL by stripping the text “comment-page-1/”.

Do you know any other fix? Please feel free to share in the comments section.

Happy Blogging and don’t forget to subscribe.

Photo Credit: willem velthoven’s photostream

How to Make Money with a Mini Website

Subscribe to my mailing list and get a FREE eBook that teaches you How to Make Money using a Mini Website. Get your copy today!

This step-by-step guide will be sent to you immediately upon sign up. There is no waiting!

I promise you the following:

  1. Your privacy is protected
  2. No spamming
  3. I will only email you when I have something interesting to share

(Required fields are bold)



Email Marketing Powered by MailChimp

Like It? Share It!

  • Digg
  • del.icio.us
  • Facebook
  • RSS
  • StumbleUpon
  • Technorati
  • Twitter

No comments yet

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS