diff --git a/docs/middleware.txt b/docs/middleware.txt index 39019caf1e..f2cf18dbdf 100644 --- a/docs/middleware.txt +++ b/docs/middleware.txt @@ -61,17 +61,18 @@ Adds a few conveniences for perfectionists: settings. If ``APPEND_SLASH`` is ``True`` and the initial URL doesn't end with a slash, - and it is not found in urlpatterns, a new URL is formed by appending a slash - at the end. If this new URL is found in urlpatterns, then an HTTP-redirect is - returned to this new URL; otherwise the initial URL is processed as usual. + and it is not found in the URLconf, then a new URL is formed by appending a + slash at the end. If this new URL is found in the URLconf, then Django + redirects the request to this new URL. Otherwise, the initial URL is + processed as usual. - So ``foo.com/bar`` will be redirected to ``foo.com/bar/`` if you do not - have a valid urlpattern for ``foo.com/bar``, and do have a valid urlpattern - for ``foo.com/bar/``. + For example, ``foo.com/bar`` will be redirected to ``foo.com/bar/`` if you + don't have a valid URL pattern for ``foo.com/bar`` but *do* have a valid + pattern for ``foo.com/bar/``. **New in Django development version:** The behavior of ``APPEND_SLASH`` has - changed slightly in the development version. It didn't used to check to see - whether the pattern was matched in the URLconf. + changed slightly in the development version. It didn't used to check whether + the pattern was matched in the URLconf. If ``PREPEND_WWW`` is ``True``, URLs that lack a leading "www." will be redirected to the same URL with a leading "www."