title: .htaccess strange behaviour
body: <p>If I put theese lines to <code>.htaccess</code> everything works well (when I'm going to <code>http://www.example.ru</code> I'm redirected to <code>http://example.ru</code>).</p>
  
  <pre><code>RewriteEngine On
  
  # Installation directory
  RewriteBase /
  
  # Redirect all www to non-www
  RewriteCond %{HTTP_HOST} ^www.example.ru [NC]
  RewriteRule ^(.*)$ http://example.ru/$1 [L,R]
  </code></pre>
  
  <p>But If I put exactly same lines to <code>&lt;VirtualHost&gt;</code> -> <code>&lt;Directory&gt;</code> section trying to go to <code>http://www.example.ru</code> redirects me to <code>http://example.ru/www</code>.</p>
  
  <p>Anybody knows why?</p>
  
  <p><strong>UPD</strong></p>
  
  <p>New <code>VirtualHost</code>:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
      ServerName example.ru
      ServerAlias www.example.ru
      ServerAdmin webmaster@localhost
      DocumentRoot /home/example/www/example.ru/www
  
      RewriteEngine On
  
      &lt;Directory /home/example/www/example.ru&gt;
              Options FollowSymLinks
              AllowOverride All
              Order allow,deny
              Allow from all
      &lt;/Directory&gt;
  
      ErrorLog /home/example/www/example.ru/log/error.log
  
      LogLevel warn
  
      SetEnvIf Remote_Addr 127.0.0.1 loopback
  
      CustomLog /home/example/www/example.ru/log/access.log combined env=!loopback
  
      # Redirect all www to non-www
      RewriteCond %{HTTP_HOST} ^www.example.ru [NC]
      RewriteRule ^(.*)$ http://example.ru$1 [L,R]
  
  &lt;/VirtualHost&gt;
  </code></pre>