i'm trying to import .htaccess
file into the URL rewrite rule in IIS 7.
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.
i apologize for not know the syntax in IIS. and i append the original file /web/.htaccess
, excluding all the comments for convenience.
Thanks in advance
DirectoryIndex app.php
<IfModule mod_rewrite.c>
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]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /app.php/
</IfModule>
</IfModule>
the current error output is this:
<rewrite>
<rules>
<!--The rule cannot be converted into an equivalent IIS format because of unsupported flags: E-->
<!--This rule was not converted because it contains references that are not supported: 'ENV::BASE'-->
<rule name="Imported Rule 3" stopProcessing="true">
<match url=".?" ignoreCase="false" />
<conditions>
<!--# If the requested filename exists, simply serve it.-->
<!--# We only want to let Apache serve files and not directories.-->
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
<!--This rule was not converted because it contains references that are not supported: 'ENV::BASE'-->
</rules>
</rewrite>
Thanks in advance