Created
July 8, 2016 01:02
-
-
Save twobob/f1f1d8c55d963ff4f3b0c317eebb92ca to your computer and use it in GitHub Desktop.
ghost URL rewrite web.config for IIS 6.x+ with production profile embedded
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration> | |
<system.webServer> | |
<handlers> | |
<add name="iisnode" path="index.js" verb="*" modules="iisnode" /> | |
</handlers> | |
<defaultDocument enabled="true"> | |
<files> | |
<add value="index.js" /> | |
</files> | |
</defaultDocument> | |
<rewrite> | |
<rules> | |
<rule name="Ghost"> | |
<match url="/*" /> | |
<conditions> | |
<add input="{PATH_INFO}" pattern=".+\.js\/debug\/?" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="index.js" /> | |
</rule> | |
</rules> | |
</rewrite> | |
<iisnode node_env="production" loggingEnabled="true" debuggingEnabled="true" devErrorsEnabled="true" /> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment