Source: https://www.wpfastestcache.com/tutorial/redirection-to-wp-contentcacheallindex-html-problem
If there is a 301 redirection rule in htaccess, apache may redirect the url to http://yourdomain.com/wp-content/cache/all/index.html. You need to add following condition before 301 RewriteRule to fix the problem.
RewriteCond %{REQUEST_URI} !wp-content\/cache\/(all|wpfc-mobile-cache)
Example:
This is a redirection sample.
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]Code language: JavaScript (javascript)
You should paste the line into your 301 redirection rule as below.
RewriteEngine On
RewriteCond %{HTTPS} off
<strong>RewriteCond %{REQUEST_URI} !wp-content\/cache\/(all|wpfc-mobile-cache)</strong>
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Code language: HTML, XML (xml)