Define environment variable outside mod_rewrite

If a user doesn't have mod_rewrite enabled, the environment variable will never be set, causing the application to always run in production mode.
Merge pull request #60 from tonynelson19/patch-1

Define environment variable outside mod_rewrite