title: xampp mod_rewrite not working in localhost VirtualHost
body: <p>I have a VirtualHost local.mywebsite.com , I use Rewrite rules 
  <strong>in my .htaccess file</strong> </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
  RewriteEngine On
  RewriteBase /
  RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
  RewriteCond %{HTTP_USER_AGENT} libwww-perl.*
  RewriteRule .* – [F,L]
  RewriteCond %{QUERY_STRING} (\"|%22).*(&lt;|&gt;|%3) [NC,OR]
  RewriteCond %{QUERY_STRING} (javascript:).*(\;) [NC,OR]
  RewriteCond %{QUERY_STRING} (&lt;|%3C).*script.*(&gt;|%3) [NC,OR]
  RewriteCond %{QUERY_STRING} (\;|\'|\"|%22).*(union|select|insert|drop|update|md5|benchmark|or|and|if) [NC,OR]
  RewriteCond %{QUERY_STRING} (base64_encode|localhost|mosconfig) [NC,OR]
  RewriteCond %{QUERY_STRING} (boot\.ini|echo.*kae|etc/passwd) [NC,OR]
  RewriteCond %{QUERY_STRING} (GLOBALS|REQUEST)(=|\[|%) [NC]
  RewriteRule .* - [E=BadQueryString,F]
  
  RewriteRule ^ - [E=BASE:{DOCBASE}] [L]
  
  RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
  RewriteCond %{HTTPS} off [OR]
  RewriteCond %{HTTPS}:s on:(s) 
  RewriteRule ^(.*)$ http%1://local.%{HTTP_HOST}/$1 [R=301,L]
  
  RewriteCond %{REQUEST_URI} /admin/
  RewriteRule .* - [S=2]
  
  RewriteRule ^(.*)index\.php$ %{ENV:BASE}$1 [R=301,L]
  
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^([a-zA-Z0-9!-/]*)$ %{ENV:BASE} [L]
  </code></pre>
  
  <p></p>
  
  <p><strong>in the httpd-vhosts.conf</strong></p>
  
  <pre><code>&lt;VirtualHost *:80&gt;
     DocumentRoot "E:/websites/local.mywebsite.com"
     ServerName local.mywebsite.com
     &lt;Directory "E:/websites/local.mywebsite.com"&gt;
      # AllowOverride All      # Deprecated
      # Order Allow,Deny       # Deprecated
      # Allow from all         # Deprecated
       AllowOverride All
      # --New way of doing it
      Require all granted    
  &lt;/Directory&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>and in httpd.conf</strong></p>
  
  <pre><code>DocumentRoot "C:/xampp/htdocs"
  &lt;Directory "C:/xampp/htdocs"&gt;
  Options Indexes FollowSymLinks Includes ExecCGI
  AllowOverride All
  Require all granted
  </code></pre>
  
  <p></p>
  
  <p>and i uncomment the LoadModule rewrite_module modules/mod_rewrite.so</p>
  
  <p>but local.mywebsite.com/fr  return Error 404 </p>