• Hello!

    I cannot get the minify and combine-functions to work on IIS7.5. None of the rewriting of URLS seems not to be genererated when using it together with WinCache nor simple files. I am using the manual mode.

    I have tried the options with Apache and APC and it works great.

    Is there any redirects int equivalent of Apache’s htaccess that is supposed to be written?

    regards, Jan

    https://www.ads-software.com/plugins/w3-total-cache/

Viewing 7 replies - 1 through 7 (of 7 total)
  • 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 https://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 https://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 :]

    Thread Starter jannejava

    (@jannejava)

    The documentation lacks very much when comming to IIS. W3TC seems not to rewrite the web.config

    I never got the auto-url-thing in minify to work on IIS either.

    What you need is to rewrite this URL, mine looks (your will be different) like this but you have to check what W3TC have genererated:

    /wp-content/cache/minify/000000/ded8f/default.include.0db772.js

    …and this is what the rewrite rules has to point to:

    /wp-content/plugins/w3-total-cache/pub/minify.php?file=000000/ded8f/default.include.0db772.js

    With the help of this tutorial I managed to write a rule.
    https://www.iis.net/learn/extensions/url-rewrite-module/creating-rewrite-rules-for-the-url-rewrite-module

    Hope this helps!

    Hello ??

    I have same problem on IIS..

    Will the developers fix it?

    Best,
    Dariusz.

    Is there a chance the plugin will work ok?

    Plugin Version: 0.9.4
        PHP Version: 5.4.26;
        Web Server: Microsoft IIS
        FTP functions: Installed (required for Self-hosted (FTP) CDN support)
        Multibyte String support: Installed (required for Rackspace Cloud Files support)
        cURL extension: Installed (required for Amazon S3, Amazon CloudFront, Rackspace CloudFiles support)
        zlib extension: Installed (required for compression support)
        Opcode cache: Not installed
        Memcache extension: Not installed
        HTML Tidy extension: Not installed (required for HTML Tidy minifier suppport)
        Mime type detection: Installed (Fileinfo) (required for CDN support)
        Hash function: Installed (hash) (required for NetDNA / MaxCDN CDN purge support)
        Safe mode: Off
        Open basedir: Off
        zlib output compression: On
        set_time_limit: Available
    
    Additional Server Modules
    
        New Relic
        PHP version: Supported
        Operating System: Not Supported. (Windows NT WP-2008-VIR 6.0 build 6002 (Windows Server 2008 Standard Edition Service Pack 2) i586 See NewRelic Requirements page.)
        Web Server: Not Supported. (Microsoft-IIS/7.0 See NewRelic Requirements page.)
    
    WordPress Resources
    
        /wp-content: OK
        /wp-content/uploads: OK
        Fancy permalinks: /%postname%/
        WP_CACHE define: Defined (true)
        URL rewrite: Disabled
        Network mode: No

    Viktor

    (@viktorsilfverhgmailcom)

    +1

    Have the same problems. Minify and combine URLs gives me 404. Also page cache is not working:

    Caching: enabled
    Status: not cached

    +1

    Got the same as @viktor

    But it was all working a few hours ago. I just can’t figure out what I changed!

    I’ve just been struggling with the same issue and managed to get it to work with rewrite rules in the web.config. I basically copied those which KuroTsuto supplied the tinkered with them until I got them to work.

    These are the rules that work for me (added before the WordPress ‘Main Rule’ rule):

    <rule name="w3tc_rewrite_test" stopProcessing="true">
        <match url="^wp-content/cache/minify/000000/w3tc_rewrite_test" />
        <action type="Rewrite" url="wp-content/plugins/w3-total-cache/pub/minify.php?w3tc_rewrite_test=1" logRewrittenUrl="true" />
    </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>
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Minifying on IIS7.5’ is closed to new replies.