amwilie
4/24/2014 - 8:42 PM

web.config (IIS) snippets

web.config (IIS) snippets

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>

      <!-- Remove Ending Extensions from URL 
           Replace .php with file exension you want removed -->
      
      <rewrite>
        <rules>
          <rule name="Remove .php" stopProcessing="true">
            <match url="^(.*)$" />
              <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                <add input="{REQUEST_FILENAME}.php" matchType="IsFile" ignoreCase="false" />
              </conditions>
              <action type="Rewrite" url="{R:1}.php" />
          </rule>
        </rules>
      </rewrite>
      
      <!-- Set Mime Type - Fixes Issue with .woff Font Files Not Being Found By Browser -->
      
      <staticContent>
  		 <remove fileExtension=".woff" /> <!-- In case IIS already has this mime type -->
  		 <mimeMap fileExtension=".woff" mimeType="application/x-font-woff" />
	  </staticContent> 
      
  </system.webServer>
</configuration>