.htaccess and prepended files

I am trying to prepend a db connection script to every file within a particular site, but the usual method of adding it to the .htaccess file does not seem to be working. Has anyone tried this on the dreamhost servers? Do they have this set in the apache configuration file?