I keep trying to convert the web.config file from my old server to the new one, which is using Ubuntu server, but I can't get the things done right. Can you guys help me to convert the code bellow to .htaccess?
<rewrite>
<rules>
<rule name="Rule IIS7">
<match url="^([a-zA-Z0-9-_.]+)(___)([0-9]+)(.*?)$" ignoreCase="false" />
<conditions>
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="post.php?redir=1&id={R:3}" appendQueryString="false" />
</rule>
<rule name="Rule IIS7 2">
<match url="(.*?)(_\!__)([0-9]+)(.*?)$" ignoreCase="false" />
<conditions>
<add input="{SCRIPT_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
<add input="{SCRIPT_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="links/cota_clicks.php?redir=1&url={R:3}" appendQueryString="false" />
</rule>
<rule name="Redirect to WWW" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^todoespacoonline.com$" />
</conditions>
<action type="Redirect" url="http://www.todoespacoonline.com/{R:0}" redirectType="Permanent" />
</rule>
<rule name="Redirect to COM" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="^todoespacoonline.com.br$" />
</conditions>
<action type="Redirect" url="http://www.todoespacoonline.com/{R:0}" redirectType="Permanent" />
</rule>
<rule name="Redirect to .COM" stopProcessing="true">
<match url=".*" />
<conditions>
<add input="{HTTP_HOST}" pattern="todoespacoonline.com.br$" />
</conditions>
<action type="Redirect" url="http://www.todoespacoonline.com/{R:0}" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
I really couldn't do that on my own.