Mercurial > hg > nginx-site
changeset 199:8796246b31e1
- Added new entries to faq.xml
- Deleted denied shite
author | Andrey Alexeev <andrew@nginx.com> |
---|---|
date | Wed, 23 Nov 2011 16:42:05 +0000 |
parents | ec4626d04879 |
children | 19c060caf965 |
files | xml/en/docs/faq.xml xml/en/docs/faq_trailing_slash_redirect.xml |
diffstat | 2 files changed, 20 insertions(+), 57 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/faq.xml Wed Nov 23 16:31:50 2011 +0000 +++ b/xml/en/docs/faq.xml Wed Nov 23 16:42:05 2011 +0000 @@ -15,6 +15,26 @@ </item> <item> +<a href="/en/docs/faq/license_copyright.xml"/> +</item> + +<item> +<a href="/en/docs/faq/accept_failed.xml"/> +</item> + +<item> +<a href="/en/docs/faq/variables_in_config.xml"/> +</item> + +<item> +<a href="/en/docs/faq/daemon_master_process_off.xml"/> +</item> + +<item> +<a href="/en/docs/faq/chunked_encoding_from_backend.xml"/> +</item> + +<item> <a href="/en/docs/sys_errlist.xml"/> </item>
--- a/xml/en/docs/faq_trailing_slash_redirect.xml Wed Nov 23 16:31:50 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,57 +0,0 @@ -<!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> - -<article name="What is the right way to do a trailing slash - redirect for the requests without a - trailing slash in the URI?" - link="/en/docs/faq_trailing_slash_redirect.html" - lang="en"> - -<section> - -<para> -<initial>Q:</initial> -What is the right way to do a trailing slash redirect for the -requests without a trailing slash in the URI? -</para> - -<para> -<initial>A:</initial> -If the URI refers to a static file or a directory then nginx -will do the redirect automatically. If it's not a static -content and REQUEST_URI should be proxied to the backends, -the following configuration will work: -</para> - -<para> -<example> -location ~* /[^/\.]+$ { - rewrite ^(.*)$ http://$http_host$1/ permanent; -} -</example> -</para> - -<para> -However, a better way of doing that would be separating -static content and proxying: -</para> - -<para> -<example> -location / { - index index.php; - try_files $uri $uri/ /index.php?$args; -} - -location ~ (?<URL>^.*/[^/.]+$) { - return 301 http://$host$url/$is_args$args; -} - -location ~ \.php$ { - ... -} -</example> -</para> - -</section> - -</article> \ No newline at end of file