Forum Moderators: open

Message Too Old, No Replies

HTTP redirect?

         

student25

2:13 pm on Aug 27, 2003 (gmt 0)

10+ Year Member



Hi!

Can someone give me a good and thourough explanation of what the HTTP redirect is?

Ive understood that when pages are moved (permanetly or temporarily) the HTTP redirect is a function that automatically redirects to the new URL, right?
But how is this done exactly?

MonkeeSage

2:56 pm on Aug 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



AFAIK, it means a redirection done from the server end instead of the client end.

A client redirect would be a meta refresh, like:
<meta http-equiv="refresh" content="5; URL=http://some.place.else/index.html">

A HTTP (server) redirect would be something like (depending on the language):

Perl:
print "Location: [some.place.else...] \n";

PHP:
header("Location: [some.place.else...] true);

With Apache and .htaccess file you can also do a 301 redirect, like:
Redirect 301 /somedir/index.html some.place.else/index.html

I think I got that right...I'm just learning about redirects myself. I'm sure someone will correct me if I got something wrong.

Jordan