dongwuwei0718 2010-02-15 18:12
浏览 68
已采纳

Apache SetEnv在REDIRECT_之前。 是什么赋予了?

For an application based on Zend Framework I use apaches SetEnv in .htaccess. I use this on test, staging and production servers like so:

SetEnv APPLICATION_ENVIRONMENT production

On the staging server I couldn't read this env var in PHP. However when I did a var_dump( $_ENV ) in php I got the value but the key was prepended with REDIRECT_ becoming

REDIRECT_APPLICATION_ENVIRONMENT

Can anybody explain why this is happening, and how I can prevent this?

  • 写回答

2条回答 默认 最新

  • duanoucuo7045 2010-02-15 18:25
    关注

    I'm guessing you have mod_rewrite rules in your .htaccess as well for Zend? I believe it may be mod_rewrite prepending that when it does a redirect so that the value won't be overridden by any new settings with the new URL.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 树莓派与pix飞控通信
  • ¥15 自动转发微信群信息到另外一个微信群
  • ¥15 outlook无法配置成功
  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题