<?xml version="1.0" encoding="UTF-8"?>
                <rule name="Redirection Https" stopProcessing="true">
                    <match url="(.*)" />
                        <add input="{HTTPS}" pattern="^OFF$" />
                    <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" />
                <rule name="REWRITE_TO_HTML" stopProcessing="true">
                    <match url="^(.+).html$" />
                    <conditions logicalGrouping="MatchAll" />
                    <action type="Redirect" url="{R:1}.sn" />
                <rule name="REWRITE_TO_PHP" stopProcessing="true">
                    <match url="^(.+).php$" />
                    <conditions logicalGrouping="MatchAll" />
                    <action type="Redirect" url="{R:1}.sn" />
                <rule name="test1">
                    <match url="^(.*)\.sn" />
                    <action type="Rewrite" url="{R:1}.php" />
                <rule name="tttt" stopProcessing="true">
                    <match url="^(.+).php(.+)" />
                    <action type="Redirect" url="{R:1}.sn{R:2}" />
                <rule name="tttt1" stopProcessing="true">
                    <match url="^(.+).html(.+)" />
                    <action type="Redirect" url="{R:1}.sn{R:2}" />

Recommended Answers

There is no set system to do this...however, I've found a blog post that should assist here: http://www.iis.net/learn/application-frameworks/install-and-configure-php-applications-on-iis/translate-htaccess-content-to-iis-webconfig

They are doing the opposite of what you are but it should help you reverse …

Jump to Post

All 4 Replies

<rewrite> <rules> <rule name="test" patternSyntax="Wildcard"> <match url="" negate="false" /> <conditions> <add input="{URL}" pattern="/abc" /> </conditions> <action type="Rewrite" url="http://testappreg.azurewebsites.net" /> </rule> <rule name="test2" patternSyntax="Wildcard"> <match url="" negate="false" /> <conditions> <add input="{HTTP_REFERER}" pattern="abc" /> </conditions> <action type="Rewrite" url="http://testappreg.azurewebsites.net/{R:1}" /> </rule> </rules> </rewrite>

Well, there is no such tool to convert web.config into .htaccess file.

<?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> <rule name="Redirect to WWW" stopProcessing="true"> <match url="^$" /> <action type="Redirect" url="http://heresmygps.com/about" redirectType="Permanent" /> </rule> <rule name="Index"> <match url="^(.*)$" /> <conditions> <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> </conditions> <action type="Rewrite" url="index.php/{R:1}" /> </rule> </rules> </rewrite> <httpErrors errorMode="Detailed" /> </system.webServer> </configuration>

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.