I have a server that has a production server a staging sever and a development server.
I maintain code by changing it on the development server testing it. Then staging it and testing it and then finally send it to production.
As part of the code base (php) there are certain URL's that require a FQDN I.e.
when in development I can use
in staging it would be
what is the best way to make the first part of the domain name a variable so as to avoid the problem of having to change the script as it moves through each test phase.
Also there are some include files that get used that use a different database name for MySQL access. how can I make them context sensitive in the same way.
not sure if this is a programming or sysadmin question but I have to start somewhere
I have the servers setup as separate Vhosts in Apache.