Turn HTACCESS into Web.Config

Asked

Viewed 158 times

-3

I would like to ask for help to export this HTACCESS (linux) for Web.Config (Windows)

RewriteEngine on
RewriteCond %{REQUEST_URI} !^/admincp/$ [NC]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9\/]+)/?$ index.php?page=$1&subpage=$2&request=$3 [QSA]
RewriteRule ^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$ index.php?page=$1&subpage=$2 [QSA]
RewriteRule ^([a-zA-Z0-9]+)/?$ index.php?page=$1 [QSA]

I’m always wrong about something, and I’m angry now, someone could help me?

  • What have you tried? It would be easier if you showed what you have and what mistake is happening.

  • I’ve already had the solution, but thank you very much.

1 answer

0


Well I’ll post the solution in case I help someone bad, my method was this.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="rule 1m">
                    <match url="^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/([a-zA-Z0-9\/]+)/?$"  />
                    <action type="Rewrite" url="/index.php?page={R:1}&amp;subpage={R:2}&amp;request={R:3}"  appendQueryString="true" />
                </rule>
                <rule name="rule 2m">
                    <match url="^([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/?$"  />
                    <action type="Rewrite" url="/index.php?page={R:1}&amp;subpage={R:2}"  appendQueryString="true" />
                </rule>
                <rule name="rule 3m">
                    <match url="^([a-zA-Z0-9]+)/?$"  />
                    <action type="Rewrite" url="/index.php?page={R:1}"  appendQueryString="true" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

I thank Deis already who at least read the question!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.