summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--system/helpers/url_helper.php2
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/helpers/url_helper.rst6
3 files changed, 7 insertions, 2 deletions
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index 57208c948..b1f5eccf1 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -534,7 +534,7 @@ if ( ! function_exists('redirect'))
}
// IIS environment likely? Use 'refresh' for better compatibility
- if (DIRECTORY_SEPARATOR !== '/' && $method === 'auto')
+ if ($method === 'auto' && isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== FALSE)
{
$method = 'refresh';
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 66dd0ea05..73d9fb0ec 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -67,6 +67,7 @@ Release Date: Not Released
- ``anchor_popup()`` will now fill the "href" attribute with the URL and its JS code will return false instead.
- Added JS window name support to ``anchor_popup()`` function.
- Added support (auto-detection) for HTTP/1.1 response code 303 in ``redirect()``.
+ - "auto" method in ``redirect()`` now chooses the "refresh" method only on IIS servers, instead of all servers on Windows.
- Added XHTML Basic 1.1 doctype to :doc:`HTML Helper <helpers/html_helper>`.
- Changed ``humanize()`` to include a second param for the separator.
- Refactored ``plural()`` and ``singular()`` to avoid double pluralization and support more words.
diff --git a/user_guide_src/source/helpers/url_helper.rst b/user_guide_src/source/helpers/url_helper.rst
index 305454048..1987dfb72 100644
--- a/user_guide_src/source/helpers/url_helper.rst
+++ b/user_guide_src/source/helpers/url_helper.rst
@@ -303,7 +303,7 @@ link. The function will build the URL based on your config file values.
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",
+being faster but less reliable on IIS servers. The default is "auto",
which will attempt to intelligently choose the method based on the server
environment.
@@ -325,3 +325,7 @@ engine purposes. The default Response Code is 302. The third parameter is
.. note:: For very fine grained control over headers, you should use the
`Output Library </libraries/output>` set_header() function.
+
+.. note:: To IIS users: if you hide the `Server` HTTP header, the "auto"
+ method won't detect IIS, in that case it is advised you explicitly
+ use the "refresh" method.