If I do a header(“Location: http://xyz.com”) does that get sent to the browser immediately? In other words, can I then do other stuff after the header command without worrying about delaying the redirect to the browser?
use htaccess to redirect
You have to do what you have to do before the header Location thing or, you can use meta refresh with a small delay.
I wants to redirect and some code executed. How do you do that with .htaccess?
htaccess is not always the best choice. In forums like phpBB the header function is used because they first need to check if for example a user is logged in or not. Then it’s so much easier to use the header function.
code 2 be executed…..
header(“Location: somepage.php”);
exit
Leave a Reply
You must be logged in to post a comment.