Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

packy's avatar
Level 7

Forge Redirct rules cause "Too many redirect"

This is confusing me, I am doing a simple permanent redirect from one page to another but it causes and endless loop even though the address are different?

  • From: /cda
  • To: /locations/cda
  • Type: permanent
0 likes
3 replies
bugsysha's avatar

Why not set it in code? I always forget to check server configuration for such things after a few months, and then I lose valuable time figuring out from where does that redirect originate.

Route::redirect('/cda', '/locations/cda');
packy's avatar
Level 7

@bugsysha funny, I did that after all the redirect errors so that works. I still would like to figure out though why that happens with Forge. I imagine setting those redirects is probably a bit more "standard practice"

bugsysha's avatar

There are too many reasons why that might happen. For example, if you have something like Cloudflare and it has it's own redirects or some policies.

You can define it in Cloudflare. You can define it in Forge. You can define it in server config file. You can define it in code. Too many places if nothing else. Also, other places are not under version control so you have no idea about what and how it was fixed.

Please or to participate in this conversation.