• Resolved seanclen

    (@seanclen)


    Hi all.
    Our development team is working on troubleshooting a bug where the Page Cache is creating a 301 redirect on a webhook.

    Our webhook lives at an endpoint similar to domain.com/?webhook=test which POST requests are sent to via a third-party service. This works great when Page Cache is disabled, but when we enable the feature, we are getting 301 redirect responses at domain.com/?webhook=test. We are assuming that the cache is somehow picking up this url so we would like to avoid that.

    We’ve tried disabling Front Page cache, adding the third-party user agent to the ignore list, and we’ve also tried adding the following to Never cache the following pages:
    /?webhook=test
    /?webhook=*/

    We are also using Disk: Enhanced.

    We found a solution on this thread that disables the plugin given a specific query parameter, but would prefer a more stable solution via w3tc if possible.

    Are there any other options available that we could try?

    The page I need help with: [log in to see the link]

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

    (@vmarko)

    Hello @seanclen

    Thank you for reaching out and I am happy to assist you with this.
    The wp_redirect may come from the PgCache_Plugin.php file due to the host mismatch. This can be fixed by adding your secondary host to mirrors in Performance>Page Cache>Aliases.
    Enable the Cache alias hostnames: and add the URL in Additional home URLs:
    I hope this helps!
    Thanks!

    Thread Starter seanclen

    (@seanclen)

    Thank you @vmarko
    What a quick response! That was the issue, we added the alias host and that fixed the redirect bug. Thank you for the explanation as well, that helped clear things up on our end, we didn’t consider host mismatch to be an issue.

    Thanks again!

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @seanclen

    You are most welcome!

    We would really appreciate it if you could take a minute and post a review here. This will help us to continue offering a top-notch product to users.
    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘301 Redirect on’ is closed to new replies.