What I need to do is load a different controller (controller2) based on if a parameter is supplied in the link. For example, https://www.local.host/route?p=1. Creating the link is not the problem. All controllers have the same display() function as well.

This sounds more that if they aren't trully dynamic, but still kinda static. In that case I would like to suggest to create seperate controllers that can handle one thing, instead of using dynamic controllers that can handle a lot.

Why not try what martti mentioned above? By injecting request class you can load whatever method you want (if the param is not null, load method 2 or 3 or whatever).

He/she stated has thought about doing this, but the controller files are already 1000+ lines each.
Tying to keep them as small as possible.

There are many ways to do that, but what is not clear IMO would be the purpose for which we are trying to use a dynamism instead of traditional methods, it is not clear the code ... there 's little clear.

If you're asking to see the entire current code, I unfortunately can't do that right now (development code at my company). If you want to see how I have routing setup, it's the same as the code for Pages.