Azure Websites – Web.config redirect

I’m trying to make my custom PHP framework work correctly using IIS (I usually use Apache/Nginx).

I have the following Web.config in my wwwroot:

<?xml version="1.0" encoding="UTF-8"?>
                <clear />
                <rule name="Main Rewrite Rule" stopProcessing="true">
                    <match url="(.*)" ignoreCase="true" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{URL}" pattern="(/[^.]*|\.(php|html?|feed|pdf|raw))$" />
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    <action type="Rewrite" url="index.php/" />

        <modules runAllManagedModulesForAllRequests="true" />

            <remove fileExtension=".svg" />
            <remove fileExtension=".eot" />
            <remove fileExtension=".less" />
            <remove fileExtension=".woff" />

            <mimeMap fileExtension=".svg" mimeType="image/svg+xml"  />
            <mimeMap fileExtension=".eot" mimeType="application/" />
            <mimeMap fileExtension=".less" mimeType="text/css" />
            <mimeMap fileExtension=".woff" mimeType="application/x-woff" />

I’m running an Azure Website (not a VM or anything, just a standard website).

The rewrite should rewrite anything that is not a directory or a file to /index.php/URL, so /homepage should be rewrote to /index.php/homepage.

However, right now, I get a standard: The resource you are looking for has been removed, had its name changed, or is temporarily unavailable. page.

Is there any way to log those errors or something? The only logs I can see in Azure is the diagnostics /LogFiles in my FTP, however, this folder is empty.

Leave a Reply


Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.