Created
March 7, 2016 13:33
-
-
Save koraysels/5d03de5554deaf185ede to your computer and use it in GitHub Desktop.
web.config for Wordpress pretty Permalinks
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.web> | |
<compilation debug="false" targetFramework="4.0"/> | |
</system.web> | |
<system.webServer> | |
<httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files"> | |
<scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/> | |
<dynamicTypes> | |
<add mimeType="text/css" enabled="true"/> | |
<add mimeType="text/html" enabled="true"/> | |
<remove fileExtension=".js"/> | |
<mimeMap fileExtension=".js" mimeType="text/javascript"/> | |
<add mimeType="text/plain" enabled="true"/> | |
<add mimeType="text/xml" enabled="true"/> | |
<add mimeType="application/json" enabled="true"/> | |
<add mimeType="image/jpeg" enabled="false"/> | |
<add mimeType="image/gif" enabled="false"/> | |
<add mimeType="image/png" enabled="false"/> | |
<add mimeType="*/*" enabled="false"/> | |
</dynamicTypes> | |
<staticTypes> | |
<add mimeType="text/css" enabled="true"/> | |
<add mimeType="text/html" enabled="true"/> | |
<remove fileExtension=".js"/> | |
<mimeMap fileExtension=".js" mimeType="text/javascript"/> | |
<add mimeType="text/plain" enabled="true"/> | |
<add mimeType="text/xml" enabled="true"/> | |
<add mimeType="application/json" enabled="true"/> | |
<add mimeType="image/jpeg" enabled="false"/> | |
<add mimeType="image/gif" enabled="false"/> | |
<add mimeType="image/png" enabled="false"/> | |
<add mimeType="*/*" enabled="false"/> | |
</staticTypes> | |
</httpCompression> | |
<urlCompression doStaticCompression="true" doDynamicCompression="true" dynamicCompressionBeforeCache="false"/> | |
<staticContent> | |
<clientCache cacheControlMode="UseExpires" httpExpires="Tue, 03 Jan 2012 03:14:07 GMT"/> | |
</staticContent> | |
<rewrite> | |
<rules> | |
<rule name="wordpress" patternSyntax="Wildcard"> | |
<match url="*"/> | |
<conditions> | |
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/> | |
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/> | |
</conditions> | |
<action type="Rewrite" url="index.php"/> | |
</rule> | |
</rules> | |
</rewrite> | |
</system.webServer> | |
</configuration> | |
/******Remove these lines and comments!****** | |
Turns on gzip compression (off for images, compress properly first) | |
Corrects a common mime type error (.js) | |
Adds the permalink rewrite rules for /%postname%/ | |
Controls static and dynamic url compression | |
Sets the clients cache expiration date and time | |
**/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment