diff xml/en/docs/http/ngx_http_core_module.xml @ 914:474a21f26a2a

Documented location behavior with proxying directives.
author Vladimir Homutov <vl@nginx.com>
date Thu, 23 May 2013 16:14:36 +0400
parents 96839d165b8a
children ded8f4a5de28
line wrap: on
line diff
--- a/xml/en/docs/http/ngx_http_core_module.xml	Thu May 23 15:22:20 2013 +0400
+++ b/xml/en/docs/http/ngx_http_core_module.xml	Thu May 23 16:14:36 2013 +0400
@@ -10,7 +10,7 @@
 <module name="Module ngx_http_core_module"
         link="/en/docs/http/ngx_http_core_module.html"
         lang="en"
-        rev="19">
+        rev="20">
 
 <section id="directives" name="Directives">
 
@@ -1479,6 +1479,31 @@
 They cannot be nested, and cannot contain nested locations.
 </para>
 
+<para>
+If a location is defined by a prefix string that ends with the slash character,
+and requests are processed by one of
+<link doc="ngx_http_proxy_module.xml" id="proxy_pass"/>,
+<link doc="ngx_http_fastcgi_module.xml" id="fastcgi_pass"/>,
+<link doc="ngx_http_scgi_module.xml" id="scgi_pass"/>,
+<link doc="ngx_http_uwsgi_module.xml" id="uwsgi_pass"/>, or
+<link doc="ngx_http_memcached_module.xml" id="memcached_pass"/>,
+then in response to a request with URI equal to this string,
+but without the trailing slash,
+a permanent redirect with the code 301 will be returned to the requested URI
+with the slash appended.
+If this is undesired, an exact match of the URI and location could be
+defined like this:
+<example>
+location /user/ {
+    proxy_pass http://user.example.com;
+}
+
+location = /user {
+    proxy_pass http://login.example.com;
+}
+</example>
+</para>
+
 <!--
 <migration from="Apache" directive="Location" />
 -->