summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/helpers/url_helper.rst21
-rw-r--r--user_guide_src/source/tutorial/static_pages.rst4
2 files changed, 13 insertions, 12 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
diff --git a/user_guide_src/source/tutorial/static_pages.rst b/user_guide_src/source/tutorial/static_pages.rst
index 0bbf51b1b..82de2a8cb 100644
--- a/user_guide_src/source/tutorial/static_pages.rst
+++ b/user_guide_src/source/tutorial/static_pages.rst
@@ -28,7 +28,7 @@ code.
<?php
class Pages extends CI_Controller {
- public function view($page == 'home')
+ public function view($page = 'home')
{
}
@@ -62,7 +62,7 @@ following code.
</head>
<body>
- <h1>CodeIgniter 2 Tutorial<h1>
+ <h1>CodeIgniter 2 Tutorial</h1>
The header contains the basic HTML code that you'll want to display
before loading the main view, together with a heading. It will also