0

Some how W3 Total Cache produce on some pages this prefix "?repeat=w3tc". And I really want to remove this from my urls, but my research didn't help me.

Edit: I'm using other plugins now - The loading times are still good, I think.

4
  • Just to be more precise: can you explain the reason you don't want it to be in your url? is it just a "visual" problem, or does cause any other problems...
    – Ben
    Commented Nov 28, 2016 at 19:10
  • It's visual but also for SEO because I google also get this prefix. If there is no way to remove this, I would swicht the plugin. :(
    – Game Unity
    Commented Nov 28, 2016 at 19:16
  • If you have a question about the inner workings of a third party plugin/theme, you have a better chance of getting an answer at its author's forum
    – cjbj
    Commented Nov 28, 2016 at 20:20
  • The support isn't that good
    – Game Unity
    Commented Nov 28, 2016 at 20:56

2 Answers 2

1

I'm using the plugin again and this url var doesn't seem to appear. Yea it's very strange because I don't really change somthing - so it just seem to be a bug of the plugin.

0

the plugin author at one time commented this:

This issue (caused by limitations in WordPress multi site that prevent the easy detection of the blog receiving a request)

are you running multi-site?

Put this in the theme_setup() function inside functions.php:

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;
}

see if it stops it.

2
  • Yes I'm running a multsite. The code give me this error ERR_TOO_MANY_REDIRECTS
    – Game Unity
    Commented Nov 29, 2016 at 14:50
  • Maybee because of the SSL redirects
    – Game Unity
    Commented Nov 29, 2016 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.