shopping-list/web.config

37 lines
1.9 KiB
XML

<?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>