Quoting Justin Patrin <[EMAIL PROTECTED]>:
> On Tue, 3 Aug 2004 15:34:27 -0500 (CDT), Bing Du <[EMAIL PROTECTED]> wrote:
> > The latest message I got was 'Redirection limit for this URL exceeded.
> > Unable to load the requested page.This may be caused by cookies that are
> > blocked.'.
> 
> Your page is redirecting you over and over again. Your problem is that
> you're not checking for https before you redirect! If the user comes
> in with the https URL, you're still redirecting them. Try checking the
> value of $_SERVER['HTTPS'].

Also, FWIW, you're supposed to also change the HTTP response code
to one that explains the reason for the redirect. Some server setups
will throw a 500 Server Error if you use just Location. So add the
following before any other header output:

header($_SERVER['SERVER_PROTOCOL'].' 302 Found');

The HTTP RFC offers various 3xx response codes and you should make
the effort of using the appropriate one. Other often useful responses
are "301 Moved Permanently" and "303 See Other". The actual text
doesn't matter but the code does.

-- 
Romanian Web Developers - http://ROWD.ORG

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to