any IIS gurus here?
i'm trying to set up a URL rewrite to allow a temporary "under maintenance" page to be displayed.
the rewrite works, however it's also filtering out the CSS and JS files that the page links to.
i know i need to set a rule to exlude them, but can't seem to get it to work.
anyone know the correct way to do this?
the following is what's currently set up
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="HTTP to HTTPS redirect" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="off" ignoreCase="true" />
</conditions>
<action type="Redirect" redirectType="Found" url="https://{HTTP_HOST}/{R:1}" />
</rule>
<rule name="Site Maintenance" enabled="true" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{REQUEST_URI}" pattern="maintenance" negate="true" />
<add input="{REQUEST_URI}" pattern="images" negate="true" />
</conditions>
<action type="Redirect" url="/maintenance.asp" appendQueryString="false" redirectType="Temporary" />
</rule>
</rules>
</rewrite>
<staticContent>
<mimeMap fileExtension=".apk" mimeType="application/vnd.android.package-archive" />
<clientCache cacheControlMode="DisableCache" />
</staticContent>
<caching enabled="false" enableKernelCache="false">
<profiles>
<add extension=".js" policy="DisableCache" kernelCachePolicy="DisableCache" />
</profiles>
</caching>
<httpErrors errorMode="Detailed">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="/404.html" responseMode="ExecuteURL" />
</httpErrors>
</system.webServer>
</configuration>
and the CSS and JS files are located in
<link rel="stylesheet" href="/includes/css/style.css"/>
<script src="/includes/scripts/startscript.js"></script>
the page that is being used as the redirect is /maintenance.html