JoePlumber
12-13-2008, 03:28 AM
I am using the code pasted in below but I have noticed that this code redirects EVERY IP address. I only want the code to redirect 25 specific IP addresses.
I do not know HOW to add in the multiple IP addresses because I don't know if a semicolon separates the IP addresses or quotations and a semicolon or a comma, or quotations and a comma.
Also, I do not have access to the server so I can't use any code that requires it. This is why I am using a client-side Javascript solution currently.
Thanks for the help,
Joe P.
<!--#if expr="${REMOTE_ADDR} = /12.34.567.89/" -->
<script language="javascript">
alert("You are being redirected.");
if (confirm("Thank you."))
{location.href="http://www.google.com” } else { ("Viewing access denied."); {location.href="http://www.msn.com" }}
</script>
<!--#endif -->
I was told to change the code to this ...but it does not work correctly:
<script language="javascript">
if("<!--#echo var="REMOTE_ADDR"-->" == "12.34.567.89"){
alert("You are being redirected.");
if (confirm("Thank you."))
{location.href="http://www.google.com” } else { ("Viewing access denied."); {location.href="http://www.msn.com" }}
</script>
<!--#endif -->
I do not know HOW to add in the multiple IP addresses because I don't know if a semicolon separates the IP addresses or quotations and a semicolon or a comma, or quotations and a comma.
Also, I do not have access to the server so I can't use any code that requires it. This is why I am using a client-side Javascript solution currently.
Thanks for the help,
Joe P.
<!--#if expr="${REMOTE_ADDR} = /12.34.567.89/" -->
<script language="javascript">
alert("You are being redirected.");
if (confirm("Thank you."))
{location.href="http://www.google.com” } else { ("Viewing access denied."); {location.href="http://www.msn.com" }}
</script>
<!--#endif -->
I was told to change the code to this ...but it does not work correctly:
<script language="javascript">
if("<!--#echo var="REMOTE_ADDR"-->" == "12.34.567.89"){
alert("You are being redirected.");
if (confirm("Thank you."))
{location.href="http://www.google.com” } else { ("Viewing access denied."); {location.href="http://www.msn.com" }}
</script>
<!--#endif -->