Forum Moderators: open
Any help that can be given with this problem would be appreciated.
This is the code that I have,that I tested last night upon a board set up for that.The reason being,I have trolls roaming my other boards ripping links off them,that are getting my members annoyed by doing so.I cannot seal my boards and have members only,otherwise I would do that.I just want to ban the certain addresses we have.
<script language="JavaScript">
// IP Redirect
var ip = '<!--#echo var="REMOTE_ADDR"-->' // ** Do Not Modify This Line **
if (ip == '00.00.00.00') {
alert("ACCESS DENIED!");
if (confirm("You are not authorized to view this web site!"))
{location.href="http://www.example.com/security.html" }
else
{ ("ACCESS DENIED!");
{location.href="http://www.example.com/security.html" }} }
</script>
The code works fine.Just to well-it bans anyone from viewing the test board.
[edited by: tedster at 2:36 pm (utc) on Oct. 1, 2004]
[edit reason] use example.com [/edit]
I have one problem.MY boards are free boards,hence I have no files that I can edit from.I have to go through the control panel.I used this code in the header,and it did work-just that it banned us all from access.
I appreciate it is Java code and my boards are HTML format code.Just please be patient with me.I am new to this.For all I know that might be the reason why it will not work properly at all.
So now you have:
<script type="text/javascript">
// IP Redirect
var ip = '<!--#echo var="REMOTE_ADDR"-->' // ** Do Not Modify This Line **
if (ip == '00.00.00.00') {window.location.replace("http://www.example.com/security.html")
}
</script>
That should be all you need. Just place a suitable security note at security.html and you don't need the alert box/confirmation thing at all. It just replaces the requested page with a different page for anyone from that IP address.
[edited by: tedster at 3:49 am (utc) on Oct. 2, 2004]
Could I re-direct them back to the front of the board.By thatI mean add my own board website address ie:WWW.mamb.com?that will then have them going round again?
And I don't think these trolls will go as far as using notepad-though I thank you for telling me that.These trolls just want those links and to clog up the server.