Resolve redirection to index_gzip.html issue

In some cases your visitors can be redirected to this kind of URL on your site:

https://example.com/wp-content/cache/wp-rocket/example.com/index.html_gzip

There could be three reasons for this related to WP Rocket.

Redirect from HTTP to HTTPS

If you have SSL enabled for your entire site, you will need to make sure that all links pointing to the HTTP version of your site will be automatically  redirected to the HTTPS version

Note: If you are running v2.5.5 of WP Rocket or older, make sure to check Fix For SSL Redirection Issue Knowledge Base article. Maybe better idea would be to update WP Rocket to the latest version

www/non-www Redirection

This problem can appear when your site is accessible via both addresses  http://www.example.com and http://example.com

To resolve it, follow our  Fixing non-www Redirection Knowledge Base article.

Remove rewrite rules from .htaccess 

Another potential issue could be related to Rewrite Rules we add in .htaccess file. To remove this, make a custom MU plugin as follows:

Note: Also read the general instructions in this article:  How to Make a Custom (MU) Plugin

1
Create a folder named mu-plugins in your wp-content folder. 
 In case a mu-plugins folder already exists, don’t create a new one, just use the existing one.
2
Using a basic text editor create a new file and put the following code in it: 
<?php
defined( 'ABSPATH' ) or die( 'Cheatin&#8217; uh?' );
/**
 * Plugin Name: WP Rocket | Remove Rewrite Rules
 * Description: Removes Rewrite Rules block of WP Rocket from .htaccess.
 * Author:      WP Rocket Support Team
 * Author URI:  http://wp-rocket.me/
 * License:     GNU General Public License v3 or later
 * License URI: http://www.gnu.org/licenses/gpl-3.0.html
 */


// Removing Rewrite Rules block of WP Rocket from .htaccess.
add_filter('rocket_htaccess_mod_rewrite', '__return_false');
	
3
Save the file as wp-rocket-remove-rewrite.php (you can name it however you want, in fact)
4
Upload this file to the mu-plugins folder created in step 1.
5
Finally, make sure to deactivate and re-activate WP Rocket.

When you have uploaded the MU plugin and reloaded your page in the browser, the weird redirection should be gone.