Automatic Redirecting...how?  | |
November 11th, 2004, 11:53 AM
|
#1 (permalink)
| | Senior Member
Join Date: Jun 2004 Location: Wayzata, MN
Posts: 756
| Automatic Redirecting...how?
Hey guys, had a Q for ya. How do you do an auto redirect to a "new" site? I'm what you'd call a newbie at HTML coding, I can make an entire site with frames or tables or what not with notepad. I can do a "click here to redirect" link (not too difficult I know), but I was wondering how to do those automatic redirects.
Thanks  |
| |
November 11th, 2004, 12:12 PM
|
#2 (permalink)
| | Ultimate Member
Join Date: Dec 2002 Location: Fayetteville, NC
Posts: 1,385
|
It's fairly simple. Just use a bit of javascript : Code: <script language=javascript><!--
top.location.replace("http://www.my_domain.com/");
//-->
</script> |
| |
November 11th, 2004, 12:18 PM
|
#3 (permalink)
| | Senior Member
Join Date: Jun 2004 Location: Wayzata, MN
Posts: 756
|
Excellent, thanks!
Oh and where do you usually place this tag?
After the opening html tag? |
| |
November 11th, 2004, 12:20 PM
|
#4 (permalink)
| | addicted
Join Date: Oct 2001 Location: Ohio
Posts: 6,103
|
This example would redirect you to TechIMO in about 8 seconds Code: <HTML><META HTTP-EQUIV="Refresh" CONTENT="8; URL=http://www.TechIMO.com"> |
| |
November 11th, 2004, 12:31 PM
|
#5 (permalink)
| | Ultimate Member
Join Date: Dec 2002 Location: Fayetteville, NC
Posts: 1,385
|
You can use either or...but, I don't recommed the meta refresh tag unless you don't want search engines to index it. If you decide to use the meta redirect instead of javascript, make sure that you don't set to 0 (seconds before it redirects to another page) as that will cause problems with Google.
If you want to use the javascript tags, you should put it inside of your <html></html> tags. |
| |
November 11th, 2004, 12:33 PM
|
#6 (permalink)
| | Senior Member
Join Date: Jun 2004 Location: Wayzata, MN
Posts: 756
|
Excellent, much apprieated embj for all your help, and DVNT1, thank you as well. |
| | | Thread Tools | Search this Thread | | | | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Most Active Discussions | | | | | Recent Discussions  | | | | | |