Help - Search - Members - Calendar
Full Version: Being Redirected from my own web sever
InsanelyMac Forum > Discuss and Learn > Internet(s), Servers, and Networks
zzrabbit
Hi All

This is starting to be a pain in the a$$..... wacko.gif

I have my own web server with NO-IP Service, When I try and go to my server in Mac using any browser, Safari, Opera, Firefox. I get redirected to freewarejava.com. But in Windows it works fine.

Here is my address: h**P://bingo75.bounceme.net

I have no clue what is going on, I hope somebody can figure this one out.



ThanX

ZZ
hecker
I extracted the code from your index.html file in: http://bingo75.bounceme.net/main/index.html

CODE
<html>
<!-- Created on: 10/21/2006 -->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <title></title>
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="author" content="highlanderiv@hotmail.com">
  <meta name="generator" content="AceHTML Freeware">
<script language="JavaScript1.2">
<!--

/*
Screen Size Redirect script (By Robert @ http://members.tripod.com/technological_tinker/)
Submitted to Dynamicdrive.com to feature script in archive
For full source, usage terms, and 100's more DHTML scripts, visit http://dynamicdrive.com
*/


if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://bingo75.bounceme.net/main/800x600")

else if (screen.width==1024||screen.height==768) //if 1024x768
window.location.replace("http://bingo75.bounceme.net/main/1024x768")

else //if all else
window.location.replace("http://freewarejava.com")

//-->

</script>
</head>
<body>

</body>
</html>

Apparently, Macs don't recognize the screen.width parameter. Why not just remove the code?

hecker
zzrabbit
Thank you hecker, I never even noticed that, I have some older people who come to the site and their screens are set at 800x600. I will have to fix that.


Thanks again

ZZ
sarahbau
If you only have the two different sized pages, you could just have
CODE
if (screen.width==800||screen.height==600) //if 800x600
window.location.replace("http://bingo75.bounceme.net/main/800x600")

else window.location.replace("http://bingo75.bounceme.net/main/1024x768")


That way it only directs the low resolution people with browsers that support that call to the smaller page, and everyone else gets directed to the larger page. It's not a Mac/Windows thing. You must be running at 800x600 or 1024x768 in Windows and something else in OS X or something. I'm running at 1600x1200 in Windows and I get redirected to the freewarejava.com page.
Ramm
This is the simplest redirection code I know of:

CODE
<html>

<head>
<title>Redirection Example Sans Comments</title>
<noscript>
<meta http-equiv="refresh" content="2; URL=page/to/redirect/to.<ext>">
</noscript>
<script language="JavaScript">
<!--
var sTargetURL = "page/to/redirect/to.<ext>";

function doRedirect()
{
    setTimeout( "window.location.href = sTargetURL", 2*1000 );
}

//-->
</script>

<script language="JavaScript1.1">
<!--
function doRedirect()
{
    window.location.replace( sTargetURL );
}

doRedirect();

//-->
</script>

</head>

<body onload="doRedirect()">

</body>

</html>
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.