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:
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.
404 Error! After Submitting a Comment on a Wordpress Blog
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
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
This step-by-step guide will be sent to you immediately upon sign up. There is no waiting!
I promise you the following:
(Required fields are bold)
Like It? Share It!
from → WordPress