 <p>Something like this rule should work in your <code>DOCUMENT_ROOT/.htaccess</code> file:</p> <pre><code>RewriteEngine On RewriteCond %{REMOTE_ADDR} ^(100\.(22|44)|22\.122) RewriteRule ^ http://mysite/service/denied.shtml? [L,NC,R=302] </code></pre>