I just got a weird idea about how to configure environment-dependent parameters. Sort of like parameters you can find in Rails' config/database.yml
In my current project I use PHP and Litespeed Web Server (though the same technique applies to PHP + Apache), and I thought... 'why not use mod_rewrite for this?'. I have separate virtual hosts configs for each env (development/production at the moment)
What I have now is:
RewriteRule (.*) $1 [env=development:1]
for the development environment vhost. But what if it will be something like this?
RewriteRule (.*) $1 [env=development:1,env=mysql_host:localhost,env=mysql_port:3306,env=mysql_user:root,env=mysql_pass:,env=mysql_db:mydbname]
Would it make sense or will cause some problems? What do you think?