Whenever I try to post a comment on on of my WordPress articles it is redirecting to 127.0.0.1. I’ve never worked on this site on my local server, so I’m not sure why it would be going there.
Commenting used to work fine. Any ideas on how to fix this?
Had this problem today, the plugin that caused it was All in One WP Security– plugin.
If I disabled “Block SpamBot Comments”-feature, everything works again.
(You can find this checkbox under WP Security / Spam Prevention, in your WordPress dashboard (panel on the left side).
This is probably caused by having WordPress installed on a website with add-on domain (2 domain names point to the same site), there weren’t any issues with single domain WordPress site and having that spam block feature enabled.
Check your .htaccess file for a rewrite rule that specifies 127.0.0.1 that may have been added by a plugin.
For example, if you use the AIOWPS plugin on a multisite installation and have enabled the “Block Spambots from Posting Comments” feature, a rewrite rule is added to .htaccess that redirects comment posts to 127.0.0.1 if the referer does not match the primary domain.
You can disable this feature and add a cutom rule that preserves its functionality by checking to see if the REFERER header contains the same domain name as the HOST header.
see: http://tltech.com/info/referrer-htaccess/
Please deactivate all the plugins. If this solves your problem try to find out which plugin is making the problem. If this does not, then the problem is with
.htaccess
. For this delete the.htaccess
file in the WordPress root directory and create a new.htaccess
file following the below steps.Dashboard
>Settings
>Permalinks
.htaccess
in the WordPress root directory and paste the code into it and save.