summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/url_helper.rst
diff options
context:
space:
mode:
authorBrandon Jones <brandon.jones@ellislab.com>2011-11-07 21:51:05 +0100
committerBrandon Jones <brandon.jones@ellislab.com>2011-11-07 21:51:05 +0100
commit50e5dbb6079380d2e79e2fbbb39adfeaa40a33ea (patch)
tree0625470ff5cd1eff555821cc9b2593a3be760676 /user_guide_src/source/helpers/url_helper.rst
parentb1b2e0ccc17193e0f765857ff65a66856e984b19 (diff)
Adding auto-detection of best redirect method in url_helper.
Diffstat (limited to 'user_guide_src/source/helpers/url_helper.rst')
-rw-r--r--user_guide_src/source/helpers/url_helper.rst21
1 files changed, 11 insertions, 10 deletions
diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst
index c72558705..e6d51b22b 100644
--- a/user_guide_src/source/helpers/url_helper.rst
+++ b/user_guide_src/source/helpers/url_helper.rst
@@ -284,23 +284,24 @@ redirect()
==========
Does a "header redirect" to the URI specified. If you specify the full
-site URL that link will be build, but for local links simply providing
+site URL that link will be built, but for local links simply providing
the URI segments to the controller you want to direct to will create the
link. The function will build the URL based on your config file values.
-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
+The optional second parameter allows you to force a particular redirection
+method. The available methods are "location" or "refresh", with location
+being faster but less reliable on Windows servers. The default is "auto",
+which will attempt to intelligently choose the method based on the server
+environment.
-::
+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');
+ redirect('/login/form/');
}
// with 301 redirect