How to do URL forwarding

Pick Language to Auto Translate:
AR | BG | CA | CS | DA | DE | EL | ES | FI | FR | HI | HR | ID | IT | IW | JA | KO | LT | LV | NL | NO | PL | PT | RO | RU | SK | SR | SL | SV | TL | UK | VI | ZH | ZH-TW

A lot of people asking how to do URL forwarding!

There are a lot of ways! Manual, Header, 301 redirect, meta refresh, etc.

In this article, I will present various method and code on how to do just that.

Different method for URL forwarding

There are several ways on how to do URL forwarding!

Manual method:

Please follow < a href="http://newurl.com">link< /a>!

Header method:

<?
header("Location: http://newurl.com");
?>

Use of 301 redirect method:


HTTP/1.1 301 Moved Permanently
Location: http://newurl.com/
Content-Type: text/html
Content-Length: 174

Moved
This page has moved to http://newurl.com/.

Use Meta-refresh method:

Please follow the link!

The above method are just some basic idea!