title: Apache rewrite rules not working
body: <p>A basic rewrite rule is not working and I have no idea why. Here's my <em>hanalulu.conf</em>:</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
  ServerName hanalulu.localhost
  DocumentRoot /var/www/hanalulu/public
  DirectoryIndex index.php
  
  &lt;Directory /&gt;
      AllowOverride all
      Order Deny,Allow
      Deny from all
      Allow from 127.0.0.1
  &lt;/Directory&gt;
  
  RewriteEngine on
  RewriteRule ^a.html$ b.html
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>After I have added an extra line in <code>hosts</code> file and enabled the site via <code>sudo a2ensite</code>. Restarted web server: <code>hanalulu.localhost/a.html</code> requests <code>a.html</code> instead of <code>b.html</code>. </p>
  
  <p>What is the problem?</p>