ESI rewrite rule in htaccess not working
-
I have enabled ESI but the following instructions are not added to the .htaccess
RewriteRule .* - [E=esi_on:1] RewriteRule .* - [E=cache-control:max-age=120]
If I add code manually outside of “Do no edit” zone added by plugin, ESI is not activated.
<IfModule LiteSpeed> RewriteRule .* - [E=esi_on:1] RewriteRule .* - [E=cache-control:max-age=120] <IfModule>
If I add code manually inside the “Do no edit” zone, it works but gets overwritten if Litespeed plugin settings are saved.
# BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## <IfModule LiteSpeed> RewriteEngine on CacheLookup on RewriteRule .* - [E=Cache-Control:no-autoflush] RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary] RewriteRule .* - [E=esi_on:1] RewriteRule .* - [E=cache-control:max-age=120] ### marker CACHE RESOURCE start ### RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600] ### marker CACHE RESOURCE end ### </IfModule> ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## # END LSCACHE
Any recommendations?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘ESI rewrite rule in htaccess not working’ is closed to new replies.