# This rule will send the requests that client made as being from our server to the
# server_name specified.
# Combined with a named apache virtualhost this can be used to expose multiple webservers
# behind the same IP public address. The server were we put this config will act as a
# gateway and the public IP address must point to him.
RewriteRule ^(.*)$ http://server_name/$1 [P,L]
RewriteRule ^$ http://server_name/ [P,L]
RewriteEngine On
#Replace ?mysite.com/ with your blog url
RewriteCond %{HTTP_REFERER} !^http://(. .)?mysite.com/ [NC]
RewriteCond %{HTTP_REFERER} !^$
#Replace /images/nohotlink.jpg with your "don't hotlink" image url
RewriteRule .*.(jpe?g|gif|bmp|png)$ /images/nohotlink.jpg [L]
# BEGIN die spam die
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} POST
RewriteCond %{REQUEST_URI} .wp-comments-post.php*
RewriteCond %{HTTP_REFERER} !.*yourdomainname.* [OR]
RewriteCond %{HTTP_USER_AGENT} ^$
RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
</IfModule>
# END die spam die