Forum Moderators: open

Message Too Old, No Replies

Need Help w/ Redirecting IP Address of a Pest

Can only be done in Java or Html

         

wattic

1:06 pm on Feb 22, 2005 (gmt 0)

10+ Year Member



Hi,
I am hoping someone can help me.
I have a pest that I am trying to block from visiting my site. I had served them with a cease and desist order for theft of my work over a year ago and now they are back(same ip as before) just being a pest spending hours on my site just being noisy, I think.
So I want to block their ip address so they just think that my site doesn't exist anymore and hopefully go away.

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

orion_rus

2:18 pm on Feb 22, 2005 (gmt 0)

10+ Year Member



I think it would be better to make it on a server side.
Better ask about it in a such language forum.
like php, aspx or perl.
To make it easy understand u can add some function what checks ip address and make such input what u want or redirect to another resource.
It's needed to make on a server side because your pests can disable javascript and enter to your site without any problems
Good luck to you