# HG changeset patch # User Ruslan Ermilov # Date 1319027951 0 # Node ID ee725af08951537e03ec77e7c0779440ff9a26c7 # Parent 56457a47490373b3c75baf56607faddae22ec579 Two unrelated changes were erroneously committed simultaneously: - Making the rest of HTML valid. - Updating the "Converting rewrite rules" howto examples to utilize the new power of the "return" directive. diff -r 56457a474903 -r ee725af08951 xml/en/docs/http/converting_rewrite_rules.xml --- a/xml/en/docs/http/converting_rewrite_rules.xml Wed Oct 19 10:39:49 2011 +0000 +++ b/xml/en/docs/http/converting_rewrite_rules.xml Wed Oct 19 12:39:11 2011 +0000 @@ -32,14 +32,14 @@ -This is a wrong, cumbersome, and ineffective way. +This is a wrong, cumbersome, and ineffective way. The right way is to define a separate server for nginx.org: server { listen 80; server_name nginx.org; - rewrite ^ http://www.nginx.org$request_uri?; + return 301 http://www.nginx.org$request_uri; } server { @@ -48,6 +48,14 @@ ... } + + +On versions prior to 0.9.1, redirects can be made with: + + rewrite ^ http://www.nginx.org$request_uri?; + + + @@ -72,16 +80,24 @@ server { listen 80; - server_name nginx.com www.nginx.com; + server_name nginx.com www.nginx.com; ... } server { listen 80 default_server; server_name _; - rewrite ^ http://nginx.com$request_uri?; + return 301 http://nginx.com$request_uri; } + + +On versions prior to 0.9.1, redirects can be made with: + + rewrite ^ http://nginx.com$request_uri?; + + + diff -r 56457a474903 -r ee725af08951 xsls/books.xsls --- a/xsls/books.xsls Wed Oct 19 10:39:49 2011 +0000 +++ b/xsls/books.xsls Wed Oct 19 12:39:11 2011 +0000 @@ -1,6 +1,7 @@ X:stylesheet { -X:output method="html" indent="no" encoding="utf-8"; +X:output method="html" indent="no" encoding="utf-8" + doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"; X:strip-space elements = "*"; @@ -42,7 +43,7 @@ - + diff -r 56457a474903 -r ee725af08951 xsls/download.xsls --- a/xsls/download.xsls Wed Oct 19 10:39:49 2011 +0000 +++ b/xsls/download.xsls Wed Oct 19 12:39:11 2011 +0000 @@ -1,6 +1,7 @@ X:stylesheet { -X:output method="html" indent="no" encoding="utf-8"; +X:output method="html" indent="no" encoding="utf-8" + doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"; X:strip-space elements = "*"; diff -r 56457a474903 -r ee725af08951 xsls/error.xsls --- a/xsls/error.xsls Wed Oct 19 10:39:49 2011 +0000 +++ b/xsls/error.xsls Wed Oct 19 12:39:11 2011 +0000 @@ -1,6 +1,7 @@ X:stylesheet { -X:output method="html" indent="no" encoding="utf-8"; +X:output method="html" indent="no" encoding="utf-8" + doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"; X:strip-space elements = "*"; @@ -12,12 +13,13 @@ X:template = "/error" { - !{@title} + !{@title} - + diff -r 56457a474903 -r ee725af08951 xsls/news.xsls --- a/xsls/news.xsls Wed Oct 19 10:39:49 2011 +0000 +++ b/xsls/news.xsls Wed Oct 19 12:39:11 2011 +0000 @@ -1,6 +1,7 @@ X:stylesheet { -X:output method="html" indent="no" encoding="utf-8"; +X:output method="html" indent="no" encoding="utf-8" + doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"; X:strip-space elements = "*"; diff -r 56457a474903 -r ee725af08951 xsls/security.xsls --- a/xsls/security.xsls Wed Oct 19 10:39:49 2011 +0000 +++ b/xsls/security.xsls Wed Oct 19 12:39:11 2011 +0000 @@ -1,6 +1,7 @@ X:stylesheet { -X:output method="html" indent="no" encoding="utf-8"; +X:output method="html" indent="no" encoding="utf-8" + doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"; X:strip-space elements = "*";