today I disabled this plugin

[ad_1]

Plugin Support
qtwrk

(@qtwrk)

that sounds like some URL was having 2 status , one for visit , one is for redirection , but in some case , the normal display URL was cached first before the redirection URL , then it works for sometime , then the redirection URL was cached first before the normal display URL , so it ends up in redirection loop

function disable_cache_on_redirection($location, $status) 
do_action( 'litespeed_control_set_nocache', 'no cache due to category setting' );
return $location;

add_filter('wp_redirect', 'disable_cache_on_redirection', 10, 2);

please try this code snippet to disable the cache on redirection , see how it goes

tried just now (added in as Mu-Plugins).

set recommended , atm seems to work so good.

I continue with this or will be fixed in future release? I lost a lot of visitors cause of this 😅

ps: TYSM for quick reply. Really appreciated 👍

Plugin Support
qtwrk

(@qtwrk)

you can keep it in your mu-plugin

it might be better you can find out when/how it will redirect , otherwise this code will work as well.

The issue only occurs when I share the dvlr link on Facebook and access it through a browser where I’m not logged in.

In the Facebook app and the in-app browser, there is a continuous loop. However, if I use Firefox, where I am logged in, there are no issues.

Now, it seems to be working fine even in the in-app browser. I will mark this as resolved, but I think it would be best to include this fix in the next release since it doesn’t seem to cause any issues when using this snippet atm; it just works.

<?php
/**
* Plugin Name: Redirect Loop Fix
* Description: A small snippet to fix the redirect loop issue caused by the LiteSpeed Cache plugin.
* Plugin URI: https://projectdmc.org/support/topic/today-i-disabled-this-plugin/
*/

/* Prevent direct access */
defined('ABSPATH') || exit;

// Redirect fix filter
add_filter('wp_redirect', function($location, $status)
do_action('litespeed_control_set_nocache', 'no cache due to category setting');
return $location;
, 10, 2);}

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer