Vermyndax / URL Update

Created Tue, 04 Mar 2014 14:28:21 +0000 Modified Tue, 31 Dec 2024 18:25:52 +0000

I’ve been doing a pretty bad job of updating this blog. Part of the reason is that I wanted to update the URL to move the blog to the root. I finally got around to doing that today. It’s not that painful, so I don’t know why I waited so long to do it.

In the meantime, I’ll start off by sharing an interesting WordPress trick that I picked up here. I’ve been trying to figure out a way to stop spambots from registering on this site and my many other WordPress sites. I may have finally figured out a way to do that. I just implemented it. We’ll see how well it works.

The trick is to add the following block of code to your .htaccess file in the root of your WordPress installation.

# BEGIN ANTISPAMBLOG REGISTRATION
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-signup.php*
RewriteCond %{HTTP_REFERER} !.<em>galaxycow.com.</em> [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) http://die-spammers.com/ [R=301,L]

Of course, you need to change “galaxycow.com” in the above code to reflect what your site is using.

We’ll see how well it works. Thanks to D’Arcy Norman for that neat trick.