[ciapug] header redirects in IE
Lathrop Preston
ciapug@cialug.org
Fri, 06 Jun 2003 10:57:47 -0500
A trick that usually will work to create that full path is to do this
header("Location:http://".strtolower($HTTP_HOST)."/login.php");
that way if you develop on one box and move to another one for live the
path with change automagically
also handy if you have firewall wierdness (ie have to use an "internal"
domain inside to see the server)
Lathrop
Dave J. Hala Jr. wrote:
> I had this problem too... What I did was use the entire url.
>
> if (!$_SESSION["s_isadmin"]) {
>
>> header("location: http://www.imsocool.com/login.php");
>>}
>>
>
>
> On Wed, 2003-06-04 at 15:08, bvonahsen@mchsi.com wrote:
>
>>I'm trying to do redirects with php 4.2.0, but IE is acting funny. All of the
>>pages in the admin area have this code to make you log in if you haven't:
>>if (!$_SESSION["s_isadmin"]) {
>> header("location: login.php");
>>}
>>
>>This works great in NS4.8 and mozilla 1.3, but IE 6 SP1 redirects to the
>>non-admin login page (../login.php, not ./login.php). Anyone know why? If I
>>change the pagename to something else (like Xlogin.php), I get a 404, I'm
>>assuming because there is no ../Xlogin.php. I saw some issues with IE 5.5 on
>>php.net, but none of those fixes helped. Any thoughts? A non-relative address
>>doesn't work either.
>>_______________________________________________
>>ciapug mailing list
>>ciapug@cialug.org
>>http://cialug.org/mailman/listinfo/ciapug