web.config到.htaccess转换重写

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
        <rules>
            <rule name="rule 1e" stopProcessing="true">
                <match url="^Assets/(.*)$"  />
                <action type="Rewrite" url="/php/Assets/{R:1}"  />
            </rule>
             <rule name="Imported Rule 0" stopProcessing="true">
                <match url="^(.*)$"  ignoreCase="true" />
                <action type="Rewrite" url="/php/index.php?url={R:1}" appendQueryString="true" />
            </rule>

        </rules>
        </rewrite>
    </system.webServer>
</configuration>

How can i convert it into .htaccess ? I searched for a converter but there's no one

You can do it manually.

  • Create a .htaccess text file.
  • Craft a RewriteRule for each <rule> set.
  • The url="^...*$" regexp remains as match pattern.
  • Whereas the <action url=...> becomes the rewrite target.
    • A {R:1} would become $1 in the target,
    • a {R:2} likewise $2 and so on.
  • <rule> flags like stopProcessing are written as [L] in Apache rules. And ignoreCase becomes [NC] for instance. (See the manual for further flags.)

For example:

  #                     <action url=>
  #                          ↓ 
  RewriteRule ^...*$  /path.php?param=$1  [NC,L]
  #             ↑                            ↑
  #        <match url=>                    flags