Changing NGINX to IIS

Modo

blame it on my asd
May 27, 2013
137
42
I have this NGINX config:
Code:
location / {
    rewrite ^.* /index.php;
}

error_page  404 /index.php;

and I want to use this in IIS? How would I do so? I have tried messing with web.config and the IIS REwrite tool but I just get error 500 :(
 

LaPatron

Smile, because it confuses people.
Nov 23, 2017
72
155
Try this for your web.config and see how it goes

XML:
<rewrite>
    <rules>
        <rule name="redirect all requests" stopProcessing="true">
            <match url="^(.*)$" ignoreCase="false"/>
            <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false"/>
            </conditions>
            <action type="Rewrite" url="index.php" appendQueryString="true"/>
        </rule>
    </rules>
</rewrite>
 
Last edited:

Users who are viewing this thread

Top