GD host is a common IDC provider that we use foreign hosts. Next I will introduce how to enable Gzip compression for GoDaddy Windows. For more information, see.
1. Check whether the root directory of your website has a web. config file.
1. If your root directory does not have the web. config file, create one by yourself. The content is as follows:
The Code is as follows: |
Copy code |
<Configuration> <System. webServer> <UrlCompression doStaticCompression = "true" doDynamicCompression = "true"/> </System. webServer> </Configuration> |
If your root directory already has the web. config file, go to ""
Add
The Code is as follows: |
Copy code |
<System. webServer> <UrlCompression doStaticCompression = "true" doDynamicCompression = "true"/> </System. webServer> |
Code
The Code is as follows: |
Copy code |
<? Xml version = "1.0" encoding = "UTF-8"?> <Configuration> <System. webServer> <Defadocument document> <! -- Set the default document --> <Files> <Remove value = "index. php"/> <Add value = "index. php"/> </Files> </Defadocument document> <HttpErrors errorMode = "Detailed"/> <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> <System. webServer> <UrlCompression doStaticCompression = "true" doDynamicCompression = "true"/> </System. webServer> </Configuration> |