Me,
I have 2 functions. 1 I call - immediate and other refresh.. the
difference is one as the name implies is immediate - (like chris pointed out
below ) ->
header('Location: http://yoursite.org/us/index.php');
The other is more of a refresh kind, waits a default of 2 secs (for me so
that I can show a warning message before it redirects..
function header_refresh_html($l_refresh_url)
{
// This is taken from php-manual
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); //
always modified
header("Cache-Control: no-store, no-cache, must-revalidate"); //
HTTP/1.1
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
// HTTP/1.0
header( "Refresh:2;url=$l_refresh_url" ); // Wait
default of 2 seconds
}
Cheers,
Mun Heng, Ow
H/M Engineering
Western Digital M'sia
DID : 03-7870 5168
-----Original Message-----
From: Chris Shiflett [mailto:[EMAIL PROTECTED]
Sent: Friday, July 18, 2003 11:46 PM
To: Louie Miranda; [EMAIL PROTECTED]
Subject: Re: [PHP] redirecting to a url..
--- Louie Miranda <[EMAIL PROTECTED]> wrote:
> echo "<meta http-equiv=\"REFRESH\" CONTENT=\"0; URL=us/index.php\">";
>
> Or you may have other more advance alternatives?
You can use a protocol redirect rather than relying on HTML:
header('Location: http://yoursite.org/us/index.php');
Chris
=====
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php