[Help Needed] Intermittent 404 on Keap Form Redirect to PHP (Empty Error Log)

Hi everyone,

I’m running into a really strange issue with a Keap (Infusionsoft) form redirect, and I’m hoping someone here has seen this before.

The Setup

  • Site: WordPress

  • Form: A Keap (Infusionsoft) form embedded on a page.

  • Action: On submit, the form is set to “Redirect to a thank-you page” (a custom web address).

  • Redirect Target: A custom PHP script on our server (e.g., http://api.example.com/stripe/checkout.php).

  • Keap Setting: The option “Pass contact’s information to the thank-you page” is checked.

  • PHP Script: The PHP script is built to read the $_GET parameters from the URL (like inf_custom_NumberOfattendees, inf_custom_FirstName, etc.) and then redirect the user to a specific Stripe checkout link.

The Problem

We’re getting reports that “often” (but not always) users will submit the form and land on a 404 Not Found page.

  • The error is intermittent. For some users, it works perfectly. For others, it seems to fail every time.

  • Clearing cache or using an Incognito window does not fix it for the affected users.

The Mystery (The Main Clue)

When I check our server’s PHP error.log, it is completely empty. There are no errors, warnings, or access logs related to this at all. This makes me think the request is being blocked before it ever reaches our PHP script.

My Theory / Next Steps

I’ve just noticed that our redirect URL in Keap is using http://.

I’m starting to wonder if this is a server-side firewall (ModSecurity / WAF) issue. My theory is:

  1. Because “Pass contact’s information” is checked, Keap is sending all user data (like LastName=O'Malley) in the URL parameters.

  2. Because the URL is http://, the firewall can read this plain-text data.

  3. Is it possible the firewall sees special characters (like an apostrophe ') and is incorrectly flagging it as an SQL Injection attack, then blocking the request with a 404?

This would explain why it’s intermittent (only affects users with special characters) and why my PHP log is empty.

My Questions for the Community

  1. Has anyone experienced this specific issue with Keap redirects?

  2. Does this “firewall blocking http parameters” theory sound plausible?

  3. Are there any other server configurations I should be checking that could cause an intermittent 404 before the PHP script is executed?

Any insights or ideas would be massively appreciated. I’m stumped!

Thanks!

Hello @IT_PLI :waving_hand:

The Kinsta hosting stack has a caching layer. If your page should execute PHP on load in order for plugin to work, the caching will interfere with this, because PHP is not executed with cache responses. Most forms use AJAX to bypass this issue.

To check whether this is caching related, go to the URL where the form is and add ?nocache=1 to the URL and press enter. This will reload page without the cache.

If it still doesn’t work, check browser console for messages showing some resource was blocked. In that case it might be the firewall/security rule. If your site is hosted on Kinsta, open a chat with our support team to look into this, otherwise contact your hosting provider.

Kind regards!

1 Like

If you are using rankmath plugin then check the Redirections.

1 Like

HI @Albert_65 Welcome to the Community! We appreciate your input :slight_smile: