add web.config to make application ready for azure

This commit is contained in:
lauralani 2021-04-01 18:17:09 +02:00
parent e169a36e5b
commit b5d4e5874a
No known key found for this signature in database
GPG key ID: DB2FEDDBFD782D6E

37
web.config Normal file
View file

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="normal page without subpage">
<match url="^([a-zA-Z0-9-]+)$" ignoreCase="false" />
<action type="Rewrite" url="?site={R:1}" appendQueryString="false" />
</rule>
<rule name="scripts">
<match url="/js/(.+)" ignoreCase="false" />
<action type="Rewrite" url="/js/{R:1}" />
</rule>
<rule name="error pages">
<match url="^error/([a-zA-Z0-9-_]+)$" ignoreCase="false" />
<action type="Rewrite" url="?site=error&amp;id={R:1}" appendQueryString="false" />
</rule>
<rule name="recipe pages">
<match url="^recipe/([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="?site=recipe&amp;number={R:1}" appendQueryString="false" />
</rule>
<rule name="recipe edits">
<match url="^edit-recipe/([0-9]+)$" ignoreCase="false" />
<action type="Rewrite" url="?site=edit-recipe&amp;number={R:1}" appendQueryString="false" />
</rule>
<rule name="login page">
<match url="^login/url=(.+)$" ignoreCase="false" />
<action type="Rewrite" url="?site=login&amp;refurl={R:1}" appendQueryString="false" />
</rule>
<rule name="api calls" stopProcessing="true">
<match url="^api/([\w-]+)/([\w-]+)$" ignoreCase="false" />
<action type="Rewrite" url="php/api.php?site=api&amp;call={R:1}&amp;function={R:2}" appendQueryString="false" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>