Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Redirect to new web site

Status
Not open for further replies.

bazzak

IS-IT--Management
Joined
Oct 4, 2001
Messages
9
Location
EG
Hi

I have an old web site which still gets hit and want to redirect any visitor automatically to my new site. Can somebody please tell me how to do this?
Thanks in advance.

Bazza
 
Here, use this:
Code:
<body>
<script language=&quot;Javascript&quot;>
<!--
var newURL   = &quot;[URL unfurl="true"]http://www.homtmail.com&quot;[/URL]
var rate = 6000 


function autosend() {
location = newURL
}

setTimeout(&quot;autosend()&quot;, rate);
//-->
</script>

<h3><font color=#bda94c&quot;><p align=left>I have moved, if you are not re-directed after a few seconds please click <a href=&quot;[URL unfurl="true"]http://www.hotmail.com&quot;>here</a>...[/URL]
</p></font color></h3>
</BODY>
The var rate tells you after how long does the redirect take effect...
Hope this helps... I have not failed; I merely found 100,000 different ways of not succeding...
 
What if the user has javascript switched off?

<meta HTTP-EQUIV=&quot;REFRESH&quot; CONTENT=&quot;x;URL=http://www.yourdomain.com&quot;>

x is the number of seconds


for details Ranjan
- A Dreamweaver Community
Join today for your answers in web design
 
Both are perfectly acceptable...
But nowadays most all sites require JS, so the browser has it turned on... I have not failed; I merely found 100,000 different ways of not succeding...
 
Yep,

and if you dont want to do it in code, there is a tool in dreamweaver that will do it for you!

In design view do the following
click on View> Head Content.
A new tool bar will appearm with some icons on it, the last icon that looks like an arrow, click on that. (the refresh button)

a pop up box pops up asking for where you want to redirect the page too, and how long you want to wait in seconds before forwarding. Simple.

If you get stuck, goto help and type refresh into the search box!!

Hope that helps
 
Bazza,

Formulaone's instructions are not quite right.

View, Head Contents, just switches the head tags icons on and off so you can adjust them. You need to INSERT.

Go to Insert, Head Tags, Refresh
and fill in the URL, number of seconds, etc. If you set the number of seconds to zero then your visitors will not get to see annoying &quot;you are being redirected&quot; page - they'll be immediately and automatically sent to your new URL.
Well, I think they're annoying. ;-)



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top