Skip to content

Instantly share code, notes, and snippets.

@ThomasHambach
Created November 3, 2015 08:14
Show Gist options
  • Save ThomasHambach/20c49b5b0c325ab4fef9 to your computer and use it in GitHub Desktop.
Save ThomasHambach/20c49b5b0c325ab4fef9 to your computer and use it in GitHub Desktop.
Angular fullstack on IIS
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<customErrors mode="off"/>
</system.web>
<system.webServer>
<httpErrors existingResponse="passthrough"/>
<handlers>
<add name="iisnode" path="server/app.js" verb="*" modules="iisnode"/>
</handlers>
<rewrite>
<rules>
<rule name="Assets">
<action type="Rewrite" url="public/assets/{R:1}" logRewrittenUrl="true"/>
<conditions>
<add input="public/assets/{R:1}" matchType="IsFile" negate="true"/>
</conditions>
<match url="assets/(.*)"/>
</rule>
<rule name="StaticContent" patternSyntax="Wildcard">
<action type="Rewrite" url="public{REQUEST_URI}" logRewrittenUrl="true"/>
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
</conditions>
<match url="*.*"/>
</rule>
<rule name="DynamicContent">
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
</conditions>
<action type="Rewrite" url="server/app.js" logRewrittenUrl="true"/>
<match url="/*"/>
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment