Django Book 翻译
菜单>:
TOC
返回
原文:
*Performs URL rewriting based on the ``APPEND_SLASH`` and ``PREPEND_WWW`` settings* : If ``APPEND_SLASH`` is ``True`` , URLs that lack a trailing slash will be redirected to the same URL with a trailing slash, unless the last component in the path contains a period. So ``foo.com/bar`` is redirected to ``foo.com/bar/`` , but ``foo.com/bar/file.txt`` is passed through unchanged.
翻译:
*依据 ``APPEND_SLASH`` 和 ``PREPEND_WWW`` 的设置执行URL重写* :如果 ``APPEND_SLASH`` 为 ``True`` , 那些尾部没有斜杠的URL将被重定向到添加了斜杠的相应URL,除非path的最末组成部分包含点号。因此, ``foo.com/bar`` 会被重定向到 ``foo.com/bar/`` , 但是 ``foo.com/bar/file.txt`` 将以不变形式通过。
备注:
译者: