Created
February 7, 2016 16:30
-
-
Save SteGriff/5f64337a07694b54d782 to your computer and use it in GitHub Desktop.
Sensible rewrite-all-to-index for PHP on IIS
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
<configuration> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="SpecificRewrite" stopProcessing="true"> | |
<match url="^" /> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | |
</conditions> | |
<action type="Rewrite" url="index.php" /> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This will redirect
host.local/long/winded/url
tohost.local/index.php
but it will leavehost.local/img/dog.png
untouched because it is a real file