Page 1 of 1

How to Use PHP to Define Redirects?

Posted: Thu Jun 11, 2009 4:19 am
by terrynowk
What I am trying to do:

URL-X redirects to URL-Y.
These URL's are external sites that I do not own.

How can php be used to output something like "URL-X redirects to URL-Y".

Example for clarification:

1. redirect.com/redirect.php redirects to example.com/somepage.php.
2. When giving php the url redirect.com/redirect.php as input,
I want php to output "redirect.com/redirect.php redirects to example.com/somepage.php".

Appreciate your answers :)

Re: How to Use PHP to Define Redirects?

Posted: Thu Jun 11, 2009 5:58 am
by marty pain
Suggest you read up on HTTP Headers, and how they can be sent using PHP.