ZenCache removes custom htaccess rules that use # BEGIN/END ZenCache comment markers #620
Comments
@raamdev writes in #617 (comment)...
@jaswsinc writes in #617 (comment)...
|
The original bug reported by @Kalfer in #617 exhibited itself by the following Dashboard message that appeared when saving the ZenCache options despite the The issue there was that @Kalfer's existing Fixing the bug reported at the beginning of this issue will solve both problems: the inadvertent removal of existing |
@jaswsinc writes...
So a simple static string in the comment should suffice, right? I was thinking we could dynamically generate a unique string on a per-site basis, but that seems unnecessary and asking for trouble (e.g., if the |
Yeah, good point. I agree, something that is always the same in every copy of ZenCache, but unique enough that it will not clash with anything else in that file; e.g., ZenCache base64 encoded: |
Next Pro Release Changelog:
|
ZenCache Pro v151220 has been released and includes changes worked on as part of this GitHub Issue. See the release announcement for further details. This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one (#620). |
Steps to reproduce this bug
Install and activate ZenCache Pro v151114
Add some rules to your
.htaccess
file that include start and end marker comments like the following:Enable the ZenCache Pro Static CDN Filters (ZenCache → Plugin Options → Static CDN Filters)
Click "Save All Changes" at the bottom
Expected Behavior
ZenCache should add any necessary rules to the
.htaccess
file and not touch any existing custom.htaccess
rules in the file.Observed Behavior
ZenCache deletes everything in between the
# BEGIN ZenCache
and# END ZenCache
comments and replaces it with a copy of the Static CDN Filters rules, which means that I lose any custom.htaccess
rules I may have added to my.htaccess
file!Note: As of ZenCache Pro v151114, the only time that ZenCache will attempt to write to the
.htaccess
file is when Static CDN Filters are enabled. If you do not use the Static CDN Filters feature, you are unaffected by this bug.The text was updated successfully, but these errors were encountered: