Last active
August 29, 2015 14:23
-
-
Save uniquelau/8821f2d3b63c8b3b83ae to your computer and use it in GitHub Desktop.
Quick Redirect to Production Media, for Media Heavy Sites
This file contains 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
<!-- IIS URL Rewrite, this can be placed in the web.config --> | |
<!-- Handle Missing Media on Development Environment --> | |
<rule name="Handle missing media" stopProcessing="true"> | |
<match url="^media/(.*)" /> | |
<conditions logicalGrouping="MatchAll"> | |
<!-- Add Conditions, so local only --> | |
<add input="{REMOTE_HOST}" pattern="localhost" /> | |
<!-- Handle Files and Folders --> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | |
</conditions> | |
<action type="Redirect" redirectType="Temporary" url="http://www.production.domain/{R:0}" appendQueryString="true" /> | |
</rule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment