|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-06 19:40 UTC] yohgaki@php.net
[2002-09-07 06:28 UTC] steve at bluearena dot com
[2002-10-08 12:09 UTC] iliaa@php.net
[2002-10-08 12:38 UTC] steve at bluearena dot com
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 15:00:02 2025 UTC |
I have run into a problem with the above setup on both the latest snapshot and also 4.2.2 - sorry if it's not a bug. <? if(!$test) die(header("Location: /?test=true")); else die("redirected ok: $REQUEST_URI"); ?> This works fine, and as expected, the output is: redirected ok: /?test=true However if I have the following lines in my httpd.conf: DocumentRoot /home/bla/html AliasMatch ^/sess/(.{4})/(.*) /home/bla/html/$2 And change the script to: <? if(!$test) die(header("Location: /sess/1234/?test=true")); else die("redirected ok: $REQUEST_URI"); ?> The output is: redirected ok: / I'm not quite sure what is going on here. I have just switched from an Apache module to CGI version for security reasons and wasn't quite expecting this problem so came into an interesting problem, a loop in my program, and crashes out with an error 500: GET / HTTP/1.0 host: www.mydomain.com HTTP/1.1 500 Internal Server Error Date: Fri, 06 Sep 2002 14:30:35 GMT Server: Apache/1.3.26 (Unix) PHP/4.2.2 mod_ssl/2.8.10 OpenSSL/0.9.6g X-Powered-By: PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3, PHP/4.2.3 Connection: close Content-Type: text/html; charset=iso-8859-1 Changing it to a absolute URL in the header("Location fixes the problem but it would be a pain to change this in all my scripts. Thanks a lot for your help.