• neXorianus

    (@nexorianus)


    Hi, I’ve got a little question:

    I’m using a htaccess and php-script that changes (virtually) the locations of my plugin and theme directory from /wp-content/plugins/plugin-name/ to /plugin/plugin-name/ and from /wp-content/themes/active-theme-name/assets/* to /assets/*

    Sadly the minifying function only sees the changed version of the inclusion paths.
    Is there any chance to teach the plugin to use the original paths?

    the code in my htaccess is like follows:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^assets/(.*) /wp-content/themes/theme-name/assets/$1 [QSA,L]
    RewriteRule ^plugins/(.*) /wp-content/plugins/$1 [QSA,L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    The function to enable the rewrites can be found here: https://github.com/roots/roots/blob/6.5.0/lib/rewrites.php

    I hope, I supplied all the information needed – and that there is a solution for my Problem.

    https://www.ads-software.com/plugins/bwp-minify/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Khang Minh

    (@oddoneout)

    The plugin should use the original paths, rewrite rules in .htaccess should not affect the paths Minify uses I believe. Can you post an example minify url?

    Thread Starter neXorianus

    (@nexorianus)

    https://zwischen-welten.info/plugins/bwp-minify/min/?f=wp-content/plugins/contact-form-7/includes/css/styles.css,assets/css/app.css&ver=20141114&debug
    this is a the URL that is produced and called in the frontend

    Plugin Author Khang Minh

    (@oddoneout)

    I see, the front-end urls are changed as well. I will need to think of a way to add support for this kind of setup, probably a setting in admin.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Minifying with virtually changed plugin/theme dir’ is closed to new replies.