Script kiddies and servers running@home (improved)

| 0

Remember my posting about Script kiddies and servers running@home? Unfortunately this little hack can’t work with HTTPS. So I figured out an even simpler way for doing the same thing – even when using HTTPS.

<VirtualHost *:80>
    ServerName *
    DocumentRoot "/var/www/localhost/htdocs"

    # rewrite everything not for rusi.is-a-geek.org to /ip-deny.html
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !=rusi.is-a-geek.org
    RewriteRule .* /ip-deny.html [L]
</VirtualHost>

Nice one, heh?