Jump to content

HTML Forwarding / Redirection

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
8 replies to this topic

#1
RobSoftware

RobSoftware

    Programmer

  • Members
  • PipPipPipPip
  • 143 posts
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.

#2
outofbreath

outofbreath

    Newbie

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

Quote

#!/usr/bin/perl

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


#3
enigma

enigma

    Learning Programmer

  • Members
  • PipPipPip
  • 40 posts
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!!!

#4
Guest_hwang_*

Guest_hwang_*
  • Guests
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!!

#5
brackett

brackett

    Programmer

  • Members
  • PipPipPipPip
  • 192 posts
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.

#6
Frantic

Frantic

    Learning Programmer

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

#7
the-chad

the-chad

    Newbie

  • Members
  • PipPip
  • 23 posts
well you could always do:

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


#8
Dan

Dan

    Programmer

  • Members
  • PipPipPipPip
  • 145 posts
I have wrote a HOWTO on this subject here, 301 Redirect tutorial

I hope it is useful to somebody!

#9
DevilsCharm

DevilsCharm

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 884 posts
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.