.htaccess accepts only specific directives, not PHP code.
In general, PHP libraries such as Laravel, Codeigniter, once they are installed they are set up with a special configuration: either on paths, either on memory limits, either on database, etc.
Because of that, when you are trying to export your entire project, including the libraries in question, the web app has very high risks to fail on the new hosting machine. Which is exactly what happened here. I don't know how your machine is configured, I don't know how Codeigniter is configured here or on your machine, I don't know if database should require special configuration or not.. Maybe there are problems on dependencies, or other stuff. There could be dozens of reasons why your project fails on our servers, and digging up the entire Codeigniter project only to fix a misconfiguration is a job of weeks, maybe months.
For future, I suggest you to install the PHP library on a hosting machine, and just keep working with it on that machine.