PDA

View Full Version : Server-side redirect?


mlse
11-14-2005, 04:29 PM
Hi,

I am familiar with the location.href="http:www.somewhere-else.com" and <meta http-equiv="refresh" content="2; URL=http://www.somewhere-else.com"> methods of performing a client-side redirect to another web page.

What ways are there to perform server-side redirects dynamically? E.g. in PHP?

TIA,
Mike.

anarchy3200
11-14-2005, 05:54 PM
In PHP you can use:


header("location:www.link-location.co.uk");


The only thing with this is your script needs planning properly as no actual html can be output before sending this redirect so it has to be planned properly.

mlse
11-14-2005, 05:56 PM
Thanks!

:thumbsup: