Home Forums WordPress Plugins Hide My WP Problem with Autoptimize plugin (cache)

This topic is: not resolved
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6364
    pokernutwins
    Post count: 85

    Hi again, ok everything is fine now on my website with HMWP apart from one thing.

    When using autoptimize wordpress plugin it stores its cached js and css files in this folder

    examples below:

    wp-content/cache/autoptimize/css/autoptimize_3723611a1390865017dd1e67696f9e60.css
    wp-content/cache/autoptimize/js/autoptimize_7b9b07b73eee79004b48bd18c1631e1b.js

    now When using HMWP the links show in the html output like this

    inc/cache/autoptimize/css/autoptimize_3723611a1390865017dd1e67696f9e60.css
    inc/cache/autoptimize/js/autoptimize_7b9b07b73eee79004b48bd18c1631e1b.js

    as you can see it only changes the name of the wp-content folder and still shows the name of the plugin twice in the output because the cache is located in a different folder than the plugin is located

    I can use the replace tools to rename both of these urls but the problem is that when the cache expires or when the plugin is flushed then it creates a new url structure so is then visible again because the url changes.

    Anyone with half a brain can just rename the inc to wp-content to find out the real path and it also gives away the use of autoptimize and its cached location.

    It is not very good having to constantly replace these urls with the replace tools everytime the cache changes.

    • This topic was modified 9 years, 4 months ago by pokernutwins.
    • This topic was modified 9 years, 4 months ago by pokernutwins.
    • This topic was modified 9 years, 4 months ago by pokernutwins.
    • This topic was modified 9 years, 4 months ago by pokernutwins.
    • This topic was modified 9 years, 4 months ago by pokernutwins.
    #6390
    Suman M.
    Post count: 12480

    Hi, as autoptimize plugin doesn’t allow to change the cache path you’ll need to do some manual setting as below:

    – in “replace in html” option add the following replacement:

    /inc/cache/autoptimize/css/autoptimize_ ==> /sitecache/cache/c/css/c_

    – in .htaccess file add following line just above RewriteCond %{REQUEST_FILENAME} !-f

    RewriteRule ^sitecache/cache/c/css/c_(.*) /wp-content/cache/autoptimize/css/autoptimize_$1 [QSA,L]

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.