So if I understand correctly everything works until you change a setting in the Cache Enabler settings page? Once a setting is changed what sort of error do you experience on pages which don’t end with a trailing slash?
Also what permalink settings do you have defined?
Yes, I’m sorry, I’ll try to explain better.
After make some tests, this is what is happening to me.
1. Install the plugin from scratch
2. Everything is caching correctly
3. Then, in the plugin configuration page, for example, check the option “Pre-compression of cached pages.”
4. Open any page to create the cache
5. It is creates the file “cache-enabler-advcache-sitename.settings” under /wp-content/cache/ and the conetent of this file is:
<?php $settings = array (
‘permalink_trailing_slash’ => true,
0 => ‘expires’,
);
* The setting ‘permalink_trailing_slash’ is the option I don’t know where comes from.
The problem is, I have some URLs with an slash “/” at the end, and other URLs end with “.html”
I hope I’m explaining better.
Thank you again!
I forgot to say, the option permalink_trailing_slash then is used inside advanced-cache.php and returning false because my products and posts have an slug ending with “.html”
Which permalink structure are you using for your site?
This is my website: https://barbatia.es
And I’m using for permalinks the pro edition of this plugin: https://ww.wp.xz.cn/plugins/permalink-manager/
But now I have the problem fixed. I have commented the following lines inside “advanced-cache.php”:
// check if we need drop the ball to cause a redirect
/*if ( isset($settings[“permalink_trailing_slash”]) ) {
if ( ! preg_match(“/\/$/”, $_SERVER[“REQUEST_URI”]) ) {
return false;
}
}*/
mmmm no, I haven’t fixed it. The file “advanced-cache.php” has any kind of regeneration and replace it with a new one and removes my commenting lines.
Ok, I fixed it.
I’m using the plugin I told you to manage permalinks and I forgot the options Settings -> Permalinks -> Common settings
And I had configured (but not using it because the permalink manager pro plugin) the post name “https://barbatia.es/sample-post/” with a trailling slash at the end.
I’m sorry for the inconvenience and thank you again for the plugin.