<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=KOI8-R" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Vladimir Getmanshchuk пишет:
<blockquote
 cite="mid:199bda641001091730s61754837kc9548da89d17a93@mail.gmail.com"
 type="cite">
  <pre wrap="">server { listen 80 default; server_name mysite.com; root /my/doc/root;
index index.html; access_log off; rewrite ^(.*)$
<a class="moz-txt-link-freetext" href="http://www.mysite.com$1">http://www.mysite.com$1</a> permanent; }
server { listen 80; server_name <a class="moz-txt-link-abbreviated" href="http://www.mysite.com">www.mysite.com</a>; root /my/doc/root;
index index.html; ... }
  </pre>
</blockquote>
Если поменять www и none-www местами получим следующее:<br>
<br>
<blockquote>
  <pre wrap=""><tt>server { 
listen 80 default; 
server_name <b>www.</b>mysite.com; 
root /my/doc/root;
index index.html; 
access_log off; 
rewrite ^(.*)$ <a class="moz-txt-link-freetext" href="http://mysite.com$1">http://mysite.com$1</a> permanent; 
}

server { 
listen 80; 
server_name mysite.com; root /my/doc/root;
index index.html; ... 
}
</tt></pre>
</blockquote>
Рассмотрим строку <br>
<pre wrap=""><tt>rewrite ^(.*)$ <a class="moz-txt-link-freetext" href="http://mysite.com$1">http://mysite.com$1</a> permanent;</tt></pre>
Допустим запрос <b><tt><a moz-do-not-send="true"
 class="moz-txt-link-freetext" href="http://www.mydomain.nl/foo">http://</a></tt><a
 moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.mydomain.nl/foo"><tt>www.site.com</tt></a></b><tt><b><a
 moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://www.mydomain.nl/foo">/foo?param</a> <br>
<br>
тогда </b></tt><tt>^(.*)$ = foo<br>
<b>следовательно</b> </tt><tt><a class="moz-txt-link-freetext" href="http://www.site.com$1">http://www.site.com$1</a></tt> = <tt><a class="moz-txt-link-freetext" href="http://">http://</a></tt><tt>site.com</tt><tt>/foo<br>
<b>где</b> ?param будет утерян! <br>
<br>
Если так, то здесь ошибка, о чем я и спрашивал... <br>
</tt><br>
</body>
</html>