WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] How to remove " ?repeat=w3tc " from query string (36 posts)

  1. wpboys
    Member
    Posted 1 year ago #

    First of all , thanks a ton for the amazing plugin Frederick.
    Network features are great in the new update.

    In a few subsites , i get " ?repeat=w3tc " added in query string.
    Please let me know how can it be removed.

    Thank You.

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. wpboys
    Member
    Posted 1 year ago #

    After going through the code details, here is what i found.
    If W3 Total Cache plugin is being used in a multisite, repeat="w3tc" will be added to the site url while moving from one blog to other, to avoid redirect loop.

  3. illbehonest
    Member
    Posted 1 year ago #

    wpboys,
    Thanks for making this post, I've also been having the same issue. So this is a new feature to prevent the redirect loop and there is nothing we can do to remove that text from URL?

    Thanks,
    James

  4. Alexander Supertramp
    Member
    Posted 1 year ago #

    I have the same issue... any solution?

  5. prock13
    Member
    Posted 1 year ago #

    I'm having the same problem and can't find a solution. Anyone?

  6. illbehonest
    Member
    Posted 1 year ago #

    There has been no solution that I've been able to find thus far.

  7. Alexander Supertramp
    Member
    Posted 1 year ago #

    could it give SEO issues? it has no sense...

  8. markhodson
    Member
    Posted 1 year ago #

    this has been wrongly marked as "resolved"

  9. tamirster
    Member
    Posted 1 year ago #

    Having the same issue - my main concern is SEO...

    Can someone find a solution?

  10. spivurno
    Member
    Posted 1 year ago #

    Also interested in removing this from my URLs. Not sure such a end-user facing solution to an issue is a good idea.

  11. Alexander Supertramp
    Member
    Posted 1 year ago #

    please remove "resolved" - it's a big trouble!

  12. salty-sailor
    Member
    Posted 1 year ago #

    It is getting indexed by Google.

  13. Successify
    Member
    Posted 1 year ago #

    Why does it still say resolved? Is there a solution?

  14. pbagosy
    Member
    Posted 1 year ago #

    This seems to be pretty critical, because as salty-sailor indicated, it's getting indexed by Google. I've had to downgrade to an older version, which is causing CDN problems on my new multisite (we just converted).

  15. shmox
    Member
    Posted 1 year ago #

    Same issue here, is there any critical update planned to resolve it ? since it's indexed by google, it should be taged as CRITICAL issue

  16. georgeinmexico
    Member
    Posted 1 year ago #

    I have the same issue. Is it a WP version or plugin version issue. Would upgrading my WP or plugin version help?

  17. rahul286
    Member
    Posted 1 year ago #

    Here are pages indexed by Google with this: https://www.google.com/search?q=inurl:%3Frepeat%3Dw3tc

  18. andremacola
    Member
    Posted 12 months ago #

    Same problem here. It is not "resolved".

  19. andremacola
    Member
    Posted 11 months ago #

    up

  20. bransom
    Member
    Posted 11 months ago #

    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.

  21. georgeinmexico
    Member
    Posted 11 months ago #

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

  22. Kristian
    Member
    Posted 11 months ago #

    I have the same problem. Is there a solution?

  23. andremacola
    Member
    Posted 11 months ago #

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

  24. Kristian
    Member
    Posted 11 months ago #

    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;
    }
  25. georgeinmexico
    Member
    Posted 11 months ago #

    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;
    }
  26. tamirster
    Member
    Posted 11 months ago #

    @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!

  27. Kristian
    Member
    Posted 11 months ago #

    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.

  28. tamirster
    Member
    Posted 11 months ago #

    @Kristian

    Thank you for replying!

  29. Kristian
    Member
    Posted 11 months ago #

    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;
    }
  30. BobSD99
    Member
    Posted 11 months ago #

    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!)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic