Just do:
Header("Location: $url");
exit;
-Rasmus
On Fri, 26 Jan 2001, Aaron D. Turner wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
I'm trying to do something in PHP4.0.4p1 that in the past I've done in
mod_perl, but appears to be more difficult. Basically I have some PHP
code that does access checks against a DB to see if that user has access
to the requested URL. I'm using mod_layout to call the PHP script so I
can wrap static html pages, CGI's, and not just PHP pages.
The issue is that for CGI's, I don't seem to be able to prevent the CGI
from actually executing and displaying content. About the best I can do
is generate a 302 with a 0 second delay in the meta tags to send them to a
"Sorry buddy" page, but the CGI output is displayed briefly.
Does anyone know of a way to force the Apache process to abort further
processing? exit and die just kill off the PHP processing engine, leaving
the CGI running. I tried trigger_error, but that just displayed a nice
error message.
Anyone have any other ideas? I've thought about generating a 302 in the
http-headers and using the Location: parameter to send them someplace else
(like how mod_rewrite does redirection) but I can't seem to get it to
work.
Thanks.
- --
Aaron Turner [EMAIL PROTECTED]|synfin.net|linuxkb.org URI:www.synfin.net
They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety. -- Benjamin Franklin
pub 1024D/F86EDAE6 Sig: 3167 CCD6 6081 0FFC B749 9A8F 8707 9817 F86E DAE6
All emails by me are PGP signed; a lack of a signature indicates a forgery.
I have retired my PGP 2.6.2 key: FBE1 CEED 57E4 AB80 596E 60BF 451B 20E8
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Public key at: http://www.synfin.net/aturner/pgpkey.asc
iEYEARECAAYFAjpx1jEACgkQhweYF/hu2ubKJwCfXrm/sQEy3t8u7vefaGlD/Pyb
zTYAn1EcoNK+fBdnF8IFLMn6ojANnbyb
=PGwr
-END PGP SIGNATURE-
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]