I am working on an e-commerce application in PHP. To keep URL\'s secure, product download links are kept behind PHP. There is a file, say downloa
You could set an environment variable on the server that controls the correct server header name (probably setup by ops team or whoever is responsible for scripting / defining server environment). This would lend itself to any stack supporting Header based file serving because the people in control of that stack are then enabled to make decisions, whilst you just read in from the environment the header.
Warning: It should be noted that this is not a novice move, so be careful. A Lot could go wrong using this if the people in charge of the server environment do not setup it probably won't work or may cause errors, but it's simple, fast and I can't think of a reason to change it.