Hello, Is it possible to convert this HTACCESS code to a Web.config file?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?route=$1 [L,QSA]
Hello, Is it possible to convert this HTACCESS code to a Web.config file?
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)\?*$ index.php?route=$1 [L,QSA]
Yes, it is possible.
There is this guide on the IIS page for the translation of the contents of a .htaccess
file into a Web.config
file. It is not worth scrutinizing the examples contained in the site in this response.
For your case, where address rewriting is done, The following link can also help .
In the example above, it would look something like this:
<rewrite>
<rules>
<rule name="Regra 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
<add input="{URL}" pattern="^/favicon.ico$" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php?route={R:1}" appendQueryString="true" />
</rule>
</rules>
</rewrite>
I have not tested this setting. I just did the translation based on the content of the question.