WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
W3TC - Minify and Roots Theme Plugin Rewrite doesn't work (2 posts)

  1. falc0nit3
    Member
    Posted 1 year ago #

    Hi, I've been trying to solve this for last 2 days but haven't been able to. I'm trying to rewrite my js and css files in order to conceal the fact that i'm using wordpress to drive my site. This is based off the 'Roots Theme Rewrite'. Here is how my htaccess file looks like because of those changes.

    ----
    RewriteRule ^css/(.*) /mysite/wp-content/themes/myTheme/testtheme/css/$1 [QSA,L]
    RewriteRule ^style.css$ /mysite/wp-content/themes/myTheme/testtheme/style.css [QSA,L]
    RewriteRule ^js/(.*) /mysite/wp-content/themes/myTheme/testtheme/js/$1 [QSA,L]
    RewriteRule ^lib/(.*) /mysite/wp-content/themes/myTheme/testtheme/lib/$1 [QSA,L]
    RewriteRule ^images/(.*) /mysite/wp-content/themes/myTheme/testtheme/images/$1 [QSA,L]
    RewriteRule ^plib/(.*) /mysite/wp-content/plugins/$1 [QSA,L]

    ---
    Now when I try to minify the .js files:
    - in automatic mode, only 3 out of 13 files get minified while the rest are loaded normally. I'm not sure why it picks only few. I suspect it must be the rewrite not finding the files correctly.
    - in manual mode, if i select the files manually, i get errors of 'file doesn't exisit' in the minify.log(debug minify enabled).

    I've been going through the minify sourcecode to try and figure if i can hardcore append the path so that it finds it.

    Right now, if a file is present here:
    wp-content/themes/mytheme/testtheme/js/custom-functions.js

    my site can find it here:
    http://localhost/js/custom-functions.js

    but w3tc minify throws a file doesn't exist since it looks here:
    c:\xampp\htdocs\js\custom-functions.js

    How do i make w3tc plugin respect the rewrites?
    - Also i have 'Rewrite URL Structure' under minify disabled.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. falc0nit3
    Member
    Posted 1 year ago #

    <BUMP>
    Anyone have any solution on how to get this to work?

    I tried enabling 'Rewrite URL Structure' under W3 minify, but the htaccess file it creates will undo all the url rewriting i pasted earlier.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic