changeset 107:ee725af08951

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.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 19 Oct 2011 12:39:11 +0000
parents 56457a474903
children 72524ae53106
files xml/en/docs/http/converting_rewrite_rules.xml xsls/books.xsls xsls/download.xsls xsls/error.xsls xsls/news.xsls xsls/security.xsls
diffstat 6 files changed, 34 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- 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 @@
 </para>
 
 <para>
-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 <url>nginx.org</url>:
 
 <programlisting>
 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 @@
     ...
 }
 </programlisting>
+
+<note>
+On versions prior to 0.9.1, redirects can be made with:
+<programlisting>
+    rewrite      ^ http://www.nginx.org$request_uri?;
+</programlisting>
+</note>
+
 </para>
 
 </section>
@@ -72,16 +80,24 @@
 <programlisting>
 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;
 }
 </programlisting>
+
+<note>
+On versions prior to 0.9.1, redirects can be made with:
+<programlisting>
+    rewrite      ^ http://nginx.com$request_uri?;
+</programlisting>
+</note>
+
 </para>
 
 </section>
--- 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 @@
 
     <td bgcolor="#EEEEEE">
     <a href="{@link}">
-    <img src="{@cover}" style="padding: 2pt;" border="0"/>
+    <img src="{@cover}" alt="" style="padding: 2pt;" border="0"/>
     </a>
     </td>
 
--- 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 = "*";
 
--- 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" {
-    <html><head><title> !{@title} </title></head>
+    <html><head><title> !{@title} </title>
 
-    <style>!{ normalize-space('
+    <style type="text/css">!{ normalize-space('
         body  { font-family:  Georgia, serif; }
         ') }
     </style>
+    </head>
 
     <body>
     <table width="100%">
--- 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 = "*";
 
--- 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 = "*";