Quantcast
Channel: WordPress.org Forums » [W3 Total Cache] Support
Viewing all articles
Browse latest Browse all 19307

KuroTsuto on "[Plugin: W3 Total Cache] Minifying on IIS7.5"

$
0
0

I too am experiencing a similar issue, though on IIS 7.0. There is a notable lack of W3TC information regarding IIS available, and sadly I'm not terribly knowledgeable when it comes to the platform.

Specifically, I have noticed that the checkbox for "Rewrite URL Structure" is disabled and stuck checked. I receive the following error:

W3 Total Cache error:It appears Minify URL rewriting is not working. Please verify that the server configuration allows .htaccess
Unfortunately minification will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
Technical info
.htaccess file contains rules to rewrite url http://mysiteurl.com/:\Hosting\7147803\html\site/wp-content/cache/minify/000000/w3tc_rewrite_test. If handled by plugin, it returns "OK" message.
The plugin made a request to http://mysiteurl.com/:\Hosting\7147803\html\site/wp-content/cache/minify/000000/w3tc_rewrite_test but received:
404 Not Found
instead of "OK" response.

Unfortunately the install page contains no information regarding IIS, nor rewrite rules in general. I have to wonder why it is that I am blocked from simply using GET variables to retrieve minified files - is this an IIS restriction?

Additionally, in wp-content/cache/log/000000/minify.log I receive a number of messages similar to the following:

[Mon, 21 Apr 2014 18:47:31 +0000] [/site/buffet-serving/] [-] File "/D:/Hosting/7147803/html/site/wp-content/themes/gyc/style.css" doesn't exist
[Mon, 21 Apr 2014 18:47:31 +0000] [/site/buffet-serving/] [-] File "/D:/Hosting/7147803/html/site/wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/modules/nextgen_gallery_display/static/nextgen_gallery_related_images.css" doesn't exist
[Mon, 21 Apr 2014 18:47:35 +0000] [/site/buffet-serving/] [-] File "/D:/Hosting/7147803/html/site/wp-content/themes/gyc/css/superfish.css" doesn't exist

However, all of the listed files are in fact correct absolute paths to existing files (though the use of forward slashes as well as the leading slash are debatable).

W3TC has not been altering my web.config file automatically and so I have been adding a few directives manually. It is currently as follows:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <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>
    <staticContent>
      <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="7.00:00:00" />
    </staticContent>
    <httpCompression directory="%SystemDrive%\inetpub\temp\IIS Temporary Compressed Files">
        <scheme name="gzip" dll="%Windir%\system32\inetsrv\gzip.dll"/>
        <dynamicTypes>
          <add mimeType="text/*" enabled="true"/>
          <add mimeType="message/*" enabled="true"/>
          <add mimeType="application/javascript" enabled="true"/>
          <add mimeType="*/*" enabled="false"/>
        </dynamicTypes>
        <staticTypes>
          <add mimeType="text/*" enabled="true"/>
          <add mimeType="message/*" enabled="true"/>
          <add mimeType="application/javascript" enabled="true"/>
          <add mimeType="*/*" enabled="false"/>
        </staticTypes>
      </httpCompression>
      <urlCompression doStaticCompression="true" doDynamicCompression="true"/>
  </system.webServer>
</configuration>

I have tried adding the following rewrite rules by hand, but to no avail:

<rule name="w3tc-minify-test" stopProcessing="true">
  <match url="^/wp-content/cache/minify.*/w3tc_rewrite_test$"  />
  <action type="Rewrite" url="/wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1"  />
</rule>
<rule name="w3tc-minify-test-file" stopProcessing="true">
  <match url="^/wp-content/cache/minify/(.+/[X]+\.css)$"  />
  <action type="Rewrite" url="/wp-content/plugins/w3-total-cache/pub/minify.php?test_file={R:1}"  />
</rule>
<rule name="w3tc-minify-file" stopProcessing="true">
  <match url="^/wp-content/cache/minify/(.+\.(css|js))$"  />
  <action type="Rewrite" url="/wp-content/plugins/w3-total-cache/pub/minify.php?file={R:1}"  />
</rule>

Any guidance or general nudging in the proper direction would be much obliged :]


Viewing all articles
Browse latest Browse all 19307

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>