Forum Moderators: open
I don't have the pleasure of being able to create my own .htacess file so I have to do it in JavaScript or html.
I found this code (below) and I like it but for one thing. It blocks ALL ip's including mine.
Please help me fix it so that it will block only the one IP address that I need it too.
************here is the code I have now(I LIKE how it redirects but it blocks everyone)*********
<!--#if expr="${REMOTE_ADDR} = /^XX.XX.XXX.XXX/"-->
<script language="javascript">
alert("The website you are trying to view has been removed!");if (confirm)
{location.href="http://www.google.com" } else {{location.href="http://www.getalife.com" }}
</script>
<!--#endif-->
*******************************************
This code below I could not get to work for me at all
****************************************
<script language="javascript">
var ip = <!--#echo var="REMOTE_ADDR"-->
if (ip <='XX.XXX.XXX.XX') {
alert("STOP! You are not authorized to access this page!");
alert("Do not attempt to return, or your computer will begin a self-destruct sequence!");
if (confirm("Please leave now Or you will be forceably removed!"))
{location.href="http://www.google.com" } else { ("OK your choice, doesn't matter to me! SeeYa!"); {location.href="http://www.getalife.com" }} }
</script>
Thanks in advance,
wattic