Zend SetEnv in .htaccess not working

前端 未结 5 1346
有刺的猬
有刺的猬 2021-02-08 05:07

I installed Zend on my ubuntu homeserver. In my .htaccess file i have the following code:

SetEnv APPLICATION_ENV development

RewriteEngine On
RewriteCond %{REQU         


        
5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 05:41

    I prefer to put SetEnv in the httpd.conf file for the local server, so that all my local ZF apps run in development mode, and when I push to the staging server it has a flag to Set the environment to staging, then the production server has no such setting so it defaults to production...

    This way I can keep the same .htaccess file in source control and when I push it out to the different servers it behaves as expected.

    middaparka is right about suExec... suExec prevents you from setting custom environment variables in your .htaccess file - according to remi at the WebFaction forum.

提交回复
热议问题