CodeIgniter Forums
HTACCESS setEnv doesn't work for all servers - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forum-28.html)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forum-30.html)
+--- Thread: HTACCESS setEnv doesn't work for all servers (/thread-68103.html)

Pages: 1 2


RE: HTACCESS setEnv doesn't work for all servers - Kaosweaver - 05-29-2017

(05-25-2017, 09:24 PM)kilishan Wrote: I just modified the framework to allow the value to be set in a .env file. I also changed the name to CI_ENVIRONMENT for more clarity.

What is the .env file?
I see an env.example file in the repository - but I don't see anything in the CI4 install about how to set that up or anything about it.


RE: HTACCESS setEnv doesn't work for all servers - kilishan - 05-29-2017

Oh, you're right, I forgot to add docs about that part of it there. I'll do that. In the meantime, these docs describe the .env file and its usage. For now:

1. create a new file, .env, in the root directory, right next to the application and system directories.
2. Add the following line:

Code:
CI_ENVIRONMENT = develop

That's it.