title: Problems importing .htaccess into IIS URL Rewrite Web.Config
body: <p>i'm trying to import <code>.htaccess</code> file into the URL rewrite rule in IIS 7.</p>
  
  <p>the current file in Symfony 2 fails importing it into IIS. i need the help of someone that knows the syntax to translate the file into something usable by IIS, appealing to the fact this work would help any future user of Symfony 2 in IIS.</p>
  
  <p>i apologize for not know the syntax in IIS. and i append the original file <code>/web/.htaccess</code> , excluding all the comments for convenience.</p>
  
  <p>Thanks in advance </p>
  
  <pre><code>DirectoryIndex app.php
  
  &lt;IfModule mod_rewrite.c&gt;
      RewriteEngine On
      RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$
  
      RewriteRule ^(.*) - [E=BASE:%1]
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
  
      RewriteRule ^app\.php(/(.*)|$) %{ENV:BASE}/$2 [R=301,L]
      RewriteCond %{REQUEST_FILENAME} -f
  
      RewriteRule .? - [L]
      RewriteRule .? %{ENV:BASE}/app.php [L]
  &lt;/IfModule&gt;
  
  &lt;IfModule !mod_rewrite.c&gt;
      &lt;IfModule mod_alias.c&gt;
          RedirectMatch 302 ^/$ /app.php/
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>the current error output is this:</p>
  
  <pre><code>&lt;rewrite&gt;
    &lt;rules&gt;
      &lt;!--The rule cannot be converted into an equivalent IIS format because of unsupported flags: E--&gt;
      &lt;!--This rule was not converted because it contains references that are not supported: 'ENV::BASE'--&gt;
      &lt;rule name="Imported Rule 3" stopProcessing="true"&gt;
        &lt;match url=".?" ignoreCase="false" /&gt;
        &lt;conditions&gt;
          &lt;!--# If the requested filename exists, simply serve it.--&gt;
          &lt;!--# We only want to let Apache serve files and not directories.--&gt;
          &lt;add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" /&gt;
        &lt;/conditions&gt;
        &lt;action type="None" /&gt;
      &lt;/rule&gt;
      &lt;!--This rule was not converted because it contains references that are not supported: 'ENV::BASE'--&gt;
    &lt;/rules&gt;
  &lt;/rewrite&gt;
  </code></pre>
  
  <p>Thanks in advance</p>