PozoApp.dev-optimized-and-D.../web.config.simple

43 lines
1.7 KiB
Plaintext
Raw Normal View History

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<!-- Simple React SPA Routing (No Node.js needed!) -->
<rewrite>
<rules>
<!-- Redirect /home/* to clean URLs -->
<rule name="Remove Home Prefix" stopProcessing="true">
<match url="^home/(.*)" />
<action type="Redirect" url="/{R:1}" redirectType="Permanent" />
</rule>
<!-- Serve React SPA for all routes (except API) -->
<rule name="React Router">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_URI}" pattern="^/api/" negate="true" />
</conditions>
<action type="Rewrite" url="/index.html" />
</rule>
</rules>
</rewrite>
<!-- Static Content & Caching -->
<staticContent>
<mimeMap fileExtension=".webp" mimeType="image/webp" />
<mimeMap fileExtension=".woff" mimeType="font/woff" />
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
</staticContent>
<!-- Compression -->
<httpCompression>
<dynamicTypes>
<add mimeType="application/javascript" enabled="true" />
<add mimeType="text/css" enabled="true" />
</dynamicTypes>
</httpCompression>
</system.webServer>
</configuration>