Adds the URL rules to the preview server, IIS config and deploy

The preview server and web.config now follow the same URLs as nginx, without
the SPA fallback. Lighthouse exceptions need a recorded reason and the 404 page
is audited through an opt-in route. The deploy checks the build first and the
served result afterwards. The IIS rules stay unverified until a host exists.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 18:13:21 +01:00
co-authored by Claude Opus 5.5
parent 716692825e
commit e4e7f8c82c
17 changed files with 1919 additions and 220 deletions
+44 -6
View File
@@ -18,16 +18,46 @@
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>
<rule name="SPA fallback" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<rule name="Index naar root" stopProcessing="true">
<match url="^index(?:\.html)?/*$" />
<action type="Redirect" url="/" redirectType="Permanent" />
</rule>
<rule name="Pagina canoniek" stopProcessing="true">
<match url="^(over-mij|portfolio|soorten-fotoshoots|soorten-fotoshoots/newborn|soorten-fotoshoots/zwangerschap|soorten-fotoshoots/gezin|soorten-fotoshoots/loveshoot|soorten-fotoshoots/portret|contact|privacyverklaring)(?:\.html)?/*$" />
<conditions>
<add input="{R:0}" pattern="^(?:over-mij|portfolio|soorten-fotoshoots|soorten-fotoshoots/newborn|soorten-fotoshoots/zwangerschap|soorten-fotoshoots/gezin|soorten-fotoshoots/loveshoot|soorten-fotoshoots/portret|contact|privacyverklaring)$" ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" />
<action type="Redirect" url="/{ToLower:{R:1}}" redirectType="Permanent" />
</rule>
<rule name="Slash weg" stopProcessing="true">
<match url="^([^/\\].*?)/+$" />
<action type="Redirect" url="/{R:1}" redirectType="Permanent" />
</rule>
<rule name="404 direct" stopProcessing="true">
<match url="^404(?:\.html)?$" />
<action type="CustomResponse" statusCode="404" statusReason="Not Found" statusDescription="Not Found" />
</rule>
<rule name="Pagina bestand" stopProcessing="true">
<match url="^(.+)$" />
<conditions>
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" />
</conditions>
<action type="Rewrite" url="{R:1}.html" />
</rule>
<rule name="Map zonder pagina" stopProcessing="true">
<match url="^(.+)$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" />
</conditions>
<action type="CustomResponse" statusCode="404" statusReason="Not Found" statusDescription="Not Found" />
</rule>
</rules>
</rewrite>
<httpErrors errorMode="Custom" existingResponse="Replace">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" subStatusCode="-1" path="/404.html" responseMode="ExecuteURL" />
</httpErrors>
<urlCompression doStaticCompression="true" doDynamicCompression="false" />
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
@@ -41,6 +71,14 @@
<staticContent>
<remove fileExtension=".woff2" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
<remove fileExtension=".js" />
<mimeMap fileExtension=".js" mimeType="text/javascript" />
<remove fileExtension=".svg" />
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
<remove fileExtension=".xml" />
<mimeMap fileExtension=".xml" mimeType="text/xml" />
<clientCache cacheControlMode="DisableCache" />
</staticContent>
</system.webServer>