Just insert the below script to the HEAD section of your page, and enter your list of IPs to block:
<script type="text/javascript">
// Block IP address script- By JavaScriptKit.com (http://www.javascriptkit.com)
// For this and over 400+ free scripts, visit JavaScript Kit- http://www.javascriptkit.com/
// This notice must stay intact for use.
//Enter list of banned ips, each separated with a comma:
var bannedips=["23.23.23.23", "11.11.11.11"]
var ip = '<!--#echo var="REMOTE_ADDR"-->'
var handleips=bannedips.join("|")
handleips=new RegExp(handleips, "i")
if (ip.search(handleips)!=-1){
alert("Your IP has been banned from this site. Redirecting...")
window.location.replace("http://www.google.com")
}
</script>
You can use this script to block certain IPs from your webpage, by redirecting them to another site. Note that your web server must have SSI enabled (most Linux servers do) for this script to work, plus you need to have a dynamic extension like shtml. Also since this script relies on JavaScript, if he/she disables JavaScript the script will become useless.