title: How to put my .htaccess in my virtualhost?
body: <p>I would like to know if it's possible to put .htaccess instructions directly in my virtualhost.</p>
  
  <p>My .htaccess :</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} -s [OR]
  RewriteCond %{REQUEST_FILENAME} -l [OR]
  RewriteCond %{REQUEST_FILENAME} -d
  RewriteRule ^.*$ - [NC,L]
  RewriteRule ^.*$ index.php [NC,L]
  </code></pre>
  
  <p>I try on my virtualhost (some instructions are deliberately deleted for this topic) :</p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
  
      ServerName domain.dev
      ServerAlias www.domain.dev
  
      &lt;Directory /www/htdocs/domain/html/&gt;
  
              Options -Indexes FollowSymLinks MultiViews
              AllowOverride All
  
      &lt;/Directory&gt;
  
      &lt;IfModule mod_rewrite.c&gt;
              RewriteEngine On
              RewriteCond %{REQUEST_FILENAME} -s [OR]
              RewriteCond %{REQUEST_FILENAME} -l [OR]
              RewriteCond %{REQUEST_FILENAME} -d
              RewriteRule ^.*$ - [NC,L]
              RewriteRule ^.*$ index.php [NC,L]
      &lt;/IfModule&gt;
  
  &lt;/VirtualHost&gt;
  </code></pre>
  
  <p>But my browser responds :</p>
  
  <pre><code>Bad Request
  Your browser sent a request that this server could not understand.
  </code></pre>