Domain based configurations


Hi guys,

I have to start a new project where configurations will be based on the domain of the website:

How can I fetch the domain name and load specific configuration files during the bootstrap of the application, if the Request object still does not exist?
I think that the $_SERVER is the unique way to achieve this , I cannot neither use middleware. I’m wrong? How would you do that?



That is the way I would think to approach it. From your index.php have a look at _SERVER and from there choose which config file to pass along to the app.