Koozali.org: home of the SME Server

Website Redirect

Jon_Reynolds

Website Redirect
« on: February 15, 2006, 01:20:28 AM »
Hello,

I have an e-smith box with the domain of www.domain.com at a clients facility. They are building a new website but in the meantime want people who come to www.domain.com to instead be redirected to www.differentnamedomain.net.

I have changed the hostnames and addresses to point to the new site but it doesn't work, it still resolves to the site hosted on the SME server. The new site also uses virtual domains so pointing to just the IP address doesn't work. I have been reading about 'Redirect' in apache and was wondering if that is what I need to do.

Can anyone give me some hints or a point in the right direction?

Thanks for any help,

Jon

Janm

Website Redirect
« Reply #1 on: February 15, 2006, 06:02:19 AM »
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>    </title>
<script language="JavaScript">
<!--
var time = null
function move() {
window.location = 'http://differentnamedomain.net'
}

//-->
</script>
</head>
<body onload="timer=setTimeout('move()',2000)">
</body>
</html>


save as index.htm
and put in your
/primary/html/

Jan

Jon_Reynolds

Website Redirect
« Reply #2 on: February 15, 2006, 07:05:01 AM »
Perfect.

Thanks Jan, I appreciate the help and this little script will go with me wherever I go now. ;)

Jon

Janm

Website Redirect
« Reply #3 on: February 15, 2006, 07:39:35 AM »
No problem
Glad i could help
Jan

ps Have a nice day  :hammer:
you can also use this

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<META HTTP-EQUIV=REFRESH CONTENT="0;
URL=http://www.differentnamedomain.net">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
</head>
</body>
</html>

Janm

and the last one
« Reply #4 on: February 22, 2006, 01:22:36 PM »
<html>
<META HTTP-EQUIV=REFRESH CONTENT="0;
URL=http://anotherdomain.com">
</html>


jan   :hammer:

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Website Redirect
« Reply #5 on: February 22, 2006, 10:17:03 PM »
Quote from: "Janm"

you can also use this


And that is preferably, because it doesn't depend on javascript being available.

You should also add text and a link which will display even if the refresh advice isn't followed.