the only way to stop this is bypass cloudflare. the webpages in question have run perfectly without cloudflare. i believe cloudflare is causing a loop,
What are the steps to reproduce the issue?
php script runs that has redirect:
$url = ‘web_page.php’;
header('Location: ’ . $url);
Sorry to see that this has been happening for you.
The 504 error here is happening at the origin, and so you would need to troubleshoot at the origin to see why it is giving this response. For some general advice on what you would be looking for you can find it here
Once you have that information you can then figure out what needs to be adjusted so the origin doesn’t return a 504.
thank you!!!
i finally figured out the problem. it happened when there was an email sent in php, the redirect was a confounding variable. because our server’s email address was set to example.com instead of mail.example.com, cloudflare and our server did not play well together