Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

HTML Forwarding / Redirection

HTML redirect

  • This topic is locked This topic is locked
8 replies to this topic

#1 RobSoftware

RobSoftware

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 141 posts

Posted 03 November 2005 - 06:50 AM

It is very, very simple:

<meta http-equiv="REFRESH" content="0;url=redirection_url.html">


Add the line above inbetween the <head> and </head> tags.
  • -1

#2 outofbreath

outofbreath

    CC Lurker

  • Just Joined
  • Pip
  • 5 posts

Posted 01 May 2006 - 06:02 AM

There are several different ways of accomplishing a redirect.
Below is the small Perl code script that redirects your site guests automatically.

#!/usr/bin/perl

print "Location: http://www.domain.com/file.htm\n\n";


  • 0

#3 enigma

enigma

    CC Regular

  • Just Joined
  • PipPipPip
  • 38 posts

Posted 09 May 2006 - 02:47 AM

really now?! I never thought redirecting codes could be that simple! I don't understand perl code scripts yet though... thanks for letting me know guys!!!
  • 0

#4 Guest_hwang_*

Guest_hwang_*
  • Guest

Posted 14 May 2006 - 01:05 PM

Are you really serious???
I never thought that could be so simple.... I never thought I could redirect a page using html code only.

Thanks for this great tip!!
  • 0

#5 brackett

brackett

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 192 posts

Posted 22 May 2006 - 10:40 AM

Note that using the META tag with a setting of 0 supposedly causes problems with Google's spider - even with some other setting, I'm not sure they'd follow it. Also, it's not as efficient or robust as a 301 (permanently moved) or 302 (temporarily) HTTP response that a server side scripting language would (probably) generate.
That being said. If you've just got an HTML page, it's a quick and easy way to get it done.
  • 0

#6 Frantic

Frantic

    CC Resident

  • Just Joined
  • PipPipPipPip
  • 91 posts

Posted 24 May 2006 - 11:26 PM

A 301 redirect is the most common and recommended redirection method.
Its safe and also SEO friendly :)
  • 0

#7 the-chad

the-chad

    CC Newcomer

  • Just Joined
  • PipPip
  • 22 posts

Posted 22 June 2006 - 06:13 PM

well you could always do:

<body onload=setTimeout("location.href='http://www.google.com'",1)>

  • 0

#8 Dan

Dan

    CC Addict

  • Just Joined
  • PipPipPipPipPip
  • 140 posts

Posted 28 June 2006 - 04:59 PM

I have wrote a HOWTO on this subject here, 301 Redirect tutorial

I hope it is useful to somebody!
  • 0

#9 DevilsCharm

DevilsCharm

    Programming God

  • Just Joined
  • PipPipPipPipPipPip
  • 858 posts

Posted 04 July 2006 - 10:33 AM

I knew there was another way other than a 301 redirect, and this is it. I couldn't remember exactly what it was, I certainly forget things often.
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download