From 05f830c7105ef3cd4a8388bffe7cf73c35236105 Mon Sep 17 00:00:00 2001
From: Derek Allard
The second parameter allows you to choose between the "location" -method (default) or the "refresh" method. Location is faster, but on Windows servers it can sometimes be a problem. Example:
+The optional second parameter allows you to choose between the "location" +method (default) or the "refresh" method. Location is faster, but on Windows servers it can sometimes be a problem. The optional third parameter allows you to send a specific HTTP Response Code - this could be used for example to create 301 redirects for search engine purposes. The default Response Code is 302. The third parameter is only available with 'location' redirects, and not 'refresh'. Examples:
if ($logged_in == FALSE)
{
redirect('/login/form/', 'refresh');
-}
+}Note: In order for this function to work it must be used before anything is outputted -to the browser since it utilizes server headers.
+to the browser since it utilizes server headers.