I’m trying to setup some mod_rewrite rules in my .htaccess file so that referral spam bots like semalt get a 403 (Forbidden) when trying to access my WordPress site.
When I test this out using my localhost as a referrer, I do indeed get the 403, but I also get a message saying that there was also a 500 error. So when I check my error.log file, it says:
I’ve been messing around with the .htaccess file for at least 5 hours trying to get this to work, but I’m stuck, does anyone know what could be causing the error? I also have a bunch of rewrite rules from my WP Super Cache plugin installation, as well as the default rewrite rules that WordPress itself creates.
Note that I’ve intentionally broken the semalt and buttons-for-website patterns in my pasted config below, because I don’t want to pass any SEO juice back to the spammers from the resulting links that the forum generates.
Sorry, I forgot to point out that the config that I tried to add is the following: