I've seen many questions on how to go from an .htaccess to a web.config. There don't seem to be many questions about going the other way, from web.config to .htaccess.
Here's the configuration file I need to convert into an .htaccess file:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{R:1}" pattern="^(cms|css|files|images|js|themes|index\.php)" negate="true" />
</conditions>
<action type="Rewrite" url="/index.php/{R:1}" />
</rule>
</rules>
<rewriteMaps>
<rewriteMap name="login">
<add key="http://server/cms/index.php?S=0&D=cp&C=login&M=login_form" value="http://server/login" />
</rewriteMap>
</rewriteMaps>
</rewrite>
<httpErrors>
<remove statusCode="403" subStatusCode="-1" />
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/error404" responseMode="ExecuteURL" />
<error statusCode="403" prefixLanguageFilePath="" path="/error403" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
There are a few parts of this that I'm not sure about, and that's what's preventing me from figuring this out on my own.
The first is the 'conditions' part of the first rule. I'm not sure how to convert that to an .htaccess rule.
The second is the 'httpErrors' section. I'm probably just having a brain fart, but I can't remember how to do that in an .htaccess file.
Any help is much appreciated!
Cheers.