comparison xml/en/docs/http/converting_rewrite_rules.xml @ 593:130fad6dc1b4

Replaced the uses of "url" element with "literal".
author Ruslan Ermilov <ru@nginx.com>
date Thu, 19 Jul 2012 05:17:45 +0000
parents 764fbac1b8b4
children cb7fbecee8e6
comparison
equal deleted inserted replaced
592:d40371689c1c 593:130fad6dc1b4
37 </programlisting> 37 </programlisting>
38 </para> 38 </para>
39 39
40 <para> 40 <para>
41 This is a wrong, cumbersome, and ineffective way. 41 This is a wrong, cumbersome, and ineffective way.
42 The right way is to define a separate server for <url>example.org</url>: 42 The right way is to define a separate server for <literal>example.org</literal>:
43 43
44 <programlisting> 44 <programlisting>
45 server { 45 server {
46 listen 80; 46 listen 80;
47 server_name example.org; 47 server_name example.org;
70 <section> 70 <section>
71 71
72 <para> 72 <para>
73 Another example. 73 Another example.
74 Instead of the &ldquo;upside-down&rdquo; logic &ldquo;all that is not 74 Instead of the &ldquo;upside-down&rdquo; logic &ldquo;all that is not
75 <url>example.com</url> and is not <url>www.example.com</url>&rdquo;: 75 <literal>example.com</literal> and is not <literal>www.example.com</literal>&rdquo;:
76 76
77 <programlisting> 77 <programlisting>
78 RewriteCond %{HTTP_HOST} !example.com 78 RewriteCond %{HTTP_HOST} !example.com
79 RewriteCond %{HTTP_HOST} !www.example.com 79 RewriteCond %{HTTP_HOST} !www.example.com
80 RewriteRule (.*) http://www.example.com$1 80 RewriteRule (.*) http://www.example.com$1
81 </programlisting> 81 </programlisting>
82 82
83 one should simply define <url>example.com</url>, <url>www.example.com</url>, 83 one should simply define <literal>example.com</literal>, <literal>www.example.com</literal>,
84 and &ldquo;everything else&rdquo;: 84 and &ldquo;everything else&rdquo;:
85 85
86 <programlisting> 86 <programlisting>
87 server { 87 server {
88 listen 80; 88 listen 80;