Viewing 15 replies - 16 through 30 (of 35 total)
  • Here are pages indexed by Google with this: https://www.google.com/search?q=inurl:%3Frepeat%3Dw3tc

    Same problem here. It is not “resolved”.

    up

    Problem for me too — I use an external CAS authenticator and the ?repeat=w3tc is tacked on to the referral URL after it comes back from the authenticator. The user is authenticated but the referred URL indicates hs is not. I don’t yet know where this is going wrong. I would have thought (hoped) that the default to ‘never cache’ wp-.*\.php should avoid trouble here. I also added wp-admin/* to cache exception list. Problem remains.

    I have the same problem. Someone please help us remove ?repeat=w3tc from URLs in multisite!

    I have the same problem. Is there a solution?

    I changed to Wp Super Cache until this and the problem with cache folder be fixed

    I think, I have fixed the issue with the following piece of code in my theme setup function:

    if(strpos($_SERVER['QUERY_STRING'],'repeat=w3tc')!==false){
     $uri = explode('?',$_SERVER['REQUEST_URI']);
     wp_redirect(home_url($uri[0]), 301);
     exit;
    }

    Your fix worked for me. Thanks!

    if(strpos($_SERVER['QUERY_STRING'],'repeat=w3tc')!==false){
     $uri = explode('?',$_SERVER['REQUEST_URI']);
     wp_redirect(home_url($uri[0]), 301);
     exit;
    }

    @kristian
    Could you further describe how to put the piece of code? Should i put it in the theme_setup() function inside functions.php?

    Do i need to reactivate the theme after doing so?

    thank you so much for your help!

    Should i put it in the theme_setup() function inside functions.php?

    Yes, correct.

    Do i need to reactivate the theme after doing so?

    No, the code is active instantly.

    @kristian

    Thank you for replying!

    My code above breaks pages with a query string (like the search page). The following code fix this issue:

    if (strpos($_SERVER['QUERY_STRING'], 'repeat=w3tc') !== false) {
     $uri = explode('?', $_SERVER['REQUEST_URI']);
     $queryString = '';
     if (isset($uri[1])) {
      $queryString = trim(str_replace('repeat=w3tc', '', $uri[1]), '&');
      $queryString = (!empty($queryString)) ? '?' . $queryString : '';
     }
     wp_redirect(home_url($uri[0] . $queryString), 301);
     exit;
    }

    I’m concerned that this solution breaks functionality of at last part of this plugin. Does anyone have input there? Also, is this occurrence due to an isolated feature within W3TC, such that disabling that feature would eliminate this problem? Or is that what we’ve just done, by adding the recommended function? (thanks for the tweak, by the way!)

    Plugin Contributor Frederick Townes

    (@fredericktownes)

    This issue (caused by limitations in WordPress multi site that prevent the easy detection of the blog receiving a request) is fixed in the next release by using a 307 redirect in the cases that cause it to appear, in addition the number of cases that cause it to appear have been reduced.

Viewing 15 replies - 16 through 30 (of 35 total)
  • The topic ‘How to remove " ?repeat=w3tc " from query string’ is closed to new replies.