• Resolved p15h

    (@prestonwordsworth)


    Dear Majumder

    Since moving over to cache rules a while ago, it’s come to our notice that the plugin’s permanent redirect for cache buster only works on permalinks, ie those served through index.php, but not for static assets like those in the /uploads folder.

    I’m not actually sure if it’s really worth fixing, given one could simply set up a page rule forwarding /*?swcfpc=1 to /$1. I’m just putting this on record so you know the redirect only works for dynamic resources.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor iSaumya

    (@isaumya)

    Hi @prestonwordsworth,
    First of all the cache buster should never be added to static files like those in the uploads folder. I have no idea why the cache buster is part of static file URLs as the plugin won’t add that automatically.

    Beside I honestly think there is no need to add the page for forwarding URLs with that query param as it is not being used anyways.

    Thread Starter p15h

    (@prestonwordsworth)

    I’m glad you pointed this out @isaumya. My guess is it has to do with the old problem with third-party page builders (Elementor in our own case) documented previously here and here.

    So what happened is we took the HTML text from Elementor at one point to do some search-and-replace, and that HTML did come with a cache buster on the link to each image. We should have manually removed the cache busters before pasting the HTML back into Elementor. That’s because when we pasted in the links with cache busters appended, Elementor apparently thought the query string was part of the links and showed it on the webpage!

    This is all a bit convoluted, but I hope I’ve managed to explain how the cache buster winded up on our static assets. So once some of the crawlers caught sight of these query strings, they started to send requests for assets with the cache buster appended – which naturally bypassed CF cache.

    After redirecting legitimate traffic using the page rule for a while, we now simply block any further requests with the swcfpc query string appended.

    Plugin Contributor iSaumya

    (@isaumya)

    Hi @prestonwordsworth,
    Yes I totally understand and this is truly an issue with page builder based sites.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cache buster redirect only works for permalinks’ is closed to new replies.