I am deploying an API that I developed using APIGILITYfor IIS. Since IIS does not support .htaccess, I am trying to create a web.config file from the contents of a .htaccess file. I used IISv7.5 and tried to install a URL converter to translate the rules. But I get an error message while converting. Below is the .htaccess file and the corresponding conversion that I get from urlRewriter.
.htaccess file
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$
RewriteRule ^(.*) - [E=BASE:%1]
RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L]
the converted rules and the errors that I get.
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^.*$" />
<conditions logicalGrouping="MatchAny">
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" />
</conditions>
<action type="None" />
</rule>
</rules>
</rewrite>
Can anyone help me?
source
share