I'm trying to get this running,
SetEnvIf Host ^dev\. HOST_DEVELOPMENT
SetEnvIf Host ^www\. HOST_PRODUCTION
<IfDefine HOST_DEVELOPMENT>
# e.g. php_flag display_errors on
</IfDefine>
<IfDefine HOST_PRODUCTION>
# e.g. php_flag display_errors off
</IfDefine>
but it doesn't work. any ideas?
Best Answer
<IfDefine>
only runs when apache starts. TheHOST_*
variables should be available in your PHP script, so you can check$_ENV['HOST_PRODUCTION']
and turndisplay_errors
off at run time.