WebProWorld Part of WebProNews.com
Page One Link To Us Edit Profile Private Messages Archives FAQ RSS Feeds  
 

Go Back   WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum
Subscribe to the Newsletter FREE!


Register FAQ Members List Calendar Arcade Chatbox Mark Forums Read

Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-07-2008, 05:19 AM
complete complete is offline
WebProWorld New Member
 

Join Date: Jan 2006
Posts: 3
complete RepRank 0
Default redirecting a web page

I did this once long time ago when I was first learning about HTML. But now I have forgotten how it is done. There is a way of having one HTML page redirecting and loading another page. I think it is done on the <body> tag. I remember it is something like <body onload=.... Does anyone know what I am talking about?
Reply With Quote
  #2 (permalink)  
Old 03-07-2008, 06:11 AM
Alan-Hart's Avatar
Alan-Hart Alan-Hart is offline
WebProWorld Member
 

Join Date: Jun 2007
Location: Swindon
Posts: 59
Alan-Hart RepRank 0
Default Re: redirecting a web page

you mean a meta refresh?

e.g.
<meta http-equiv="refresh" content="2;url=http://google.com">

where 2 is the time in milliseconds to wait before redirecting.

Keep In Mind:
- Refreshing the current page can confuse people. If they didn't request the reload, some people can get concerned about security.
- Search engines dont like it

Last edited by Alan-Hart : 03-07-2008 at 06:14 AM.
Reply With Quote
  #3 (permalink)  
Old 03-07-2008, 08:38 AM
Jean-Luc Jean-Luc is offline
WebProWorld Member
 

Join Date: Dec 2007
Location: Brussels, Belgium
Posts: 78
Jean-Luc RepRank 1
Default Re: redirecting a web page

Quote:
Originally Posted by complete View Post
I remember it is something like <body onload=.... Does anyone know what I am talking about?
Search Google for JavaScript redirect body onload and you will find plenty of information.

Jean-Luc
__________________
Checking redirects is now as easy as 1 2 3, even if you are not a HTTP-header guru !
AWStats Support: installation assistance, add-on's, extra sections, dedicated forum,...
Reply With Quote
  #4 (permalink)  
Old 03-07-2008, 09:12 AM
Steven Glover's Avatar
Steven Glover Steven Glover is offline
WebProWorld Veteran
 

Join Date: Jul 2003
Location: Orlando, Florida
Posts: 461
Steven Glover RepRank 0
Default Re: redirecting a web page

You may want to consider using an htaccess file to do you redirect. They work really great and happen server side so you don't need to worry about browser compatability or any network security software that might be installed on the end user machine.

If you are not familiar with using HTACCESS check out this free software I use it all the time Downloading HTAccessible
Reply With Quote
  #5 (permalink)  
Old 03-07-2008, 04:13 PM
nelsonez nelsonez is offline
WebProWorld Pro
 

Join Date: Feb 2004
Posts: 104
nelsonez RepRank 0
Default Re: redirecting a web page

Steven brings up a good point. htaccess files are much better for redirects and if you use a 301 redirect method you won't run into any problems with the search engines.

Using a javascript (which the search engines typically can't follow) will only help your visitors whereas the search engines could misinterpret this as cloaking and they could penalize your site. I would be very careful in using the javascript or meta refresh method for a redirect.

Eric
__________________
Eric Nelson, Ph.D. <<SlickRockWeb>> Affordable SEO, Belize resort for sale or just take a Belize vacation.
Reply With Quote
  #6 (permalink)  
Old 03-07-2008, 05:03 PM
Tech Manager Tech Manager is offline
WebProWorld Pro
 

Join Date: Jan 2008
Posts: 249
Tech Manager RepRank 1
Default Re: redirecting a web page

Google and most major search engines may penalize you for using meta tag or javascript redirects (not to mention that some systems may have javascript turned off). In my humble opinion it is always better to use mod_rewrite or a simple 301 redirect in .htaccess. It's cleaner, avoids the suggestion of unethical redirects and the Search Engines will love you.
__________________
I use Country IP Blocks as added security for my networks and servers.
Reply With Quote
  #7 (permalink)  
Old 03-07-2008, 05:07 PM
adrienneadrienne adrienneadrienne is offline
WebProWorld New Member
 

Join Date: Aug 2006
Location: London
Posts: 1
adrienneadrienne RepRank 0
Default Re: redirecting a web page

Quote:
Originally Posted by complete View Post
I did this once long time ago when I was first learning about HTML. But now I have forgotten how it is done. There is a way of having one HTML page redirecting and loading another page. I think it is done on the <body> tag. I remember it is something like <body onload=.... Does anyone know what I am talking about?
I am so glad someone else forgets things like I do. I have to remember which site I did the fix on last time, and then copy it. This is half the reason that I write blog posts - as an aide memoire for myself!! But even I remember that the code is a meta refresh and I have used it for several blogspot addresses to send traffic to my chosen domain.
Reply With Quote
  #8 (permalink)  
Old 03-08-2008, 05:42 AM
richard-s richard-s is offline
WebProWorld Member
 

Join Date: Feb 2004
Posts: 42
richard-s RepRank 1
Default This works for me:

I wrote this page of instructions some time ago:

How to Construct a Redirect Page.

With some web-browsers, and some security setting, any active scripts may trigger a security alert - this will worry inexperienced visitors.

Richard
__________________
www.hemyockcastle.co.uk
Comfortable accommodation amongst the Blackdown Hills, Devon, UK
Reply With Quote
  #9 (permalink)  
Old 03-08-2008, 09:00 PM
1stgirl.com 1stgirl.com is offline
WebProWorld Member
 

Join Date: Dec 2006
Posts: 52
1stgirl.com RepRank 0
Default Re: redirecting a web page

complete: SEs do not like the meta refresh for reasons already given above.

I had implemented the 301 redirect method many times and enjoyed excellent results.

The most recent involved thousands of webpages when I was no longer allowed to display
Adsense ads at one of my sites due to non-compliance issues (account not suspended).
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Web Programming Discussion Forum


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Redirecting Page Rank wige Google Discussion Forum 0 09-07-2007 11:21 AM
Redirecting URL tushar123 Search Engine Optimization Forum 0 11-09-2006 03:12 AM
Problem in redirecting dynamic page to static one ! Pls HELP ashishdabas Search Engine Optimization Forum 2 09-11-2006 04:37 PM
MSN.com redirecting to MSN.co.uk dburdon MSN Search Discussion Forum 4 05-04-2006 09:00 AM
MSN.com redirecting my site flyclothing MSN Search Discussion Forum 6 04-26-2006 10:38 AM


Search Engine Friendly URLs by vBSEO 3.0.0