Is there any way, from a PHP script called from mod_php with apache, to tell apache to do an INTERNAL redirect to some other file?
I do not want to read/require this file from PHP and spit it out, I think it'd be more efficient to pass this off to Apache. I believe this can be done with mod_perl and I'm curious if there's a way to do it with PHP/mod_php/apache.
Thanks!
virtual() may do what you want. I'm not sure, I've never tried it.
Note that include() and require() will work if you're just calling HTML or PHP pages, plus be portable to other PHP installations.
I vaguely remember that using a Location header with a local url as doing an internal redirect (such as header("Location: /uri/here.php");
, but I can't test it here to make sure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With