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 to /ip-deny.html
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !
    RewriteRule .* /ip-deny.html [L]

Nice one, heh?