Set the environment context for TYPO3


Fri May 28 2021 08:39:23 GMT+0000 (UTC)

Saved by @dphillips #typo3 #htaccess #context #development

# Inside .htaccess

SetEnvIf Host projectname\.com$ TYPO3_CONTEXT=Production
SetEnvIf Host projectname\.test$ TYPO3_CONTEXT=Development

# or you can just force it by using

SetEnv TYPO3_CONTEXT Development

There are a few ways you can set the environment context for TYPO3. I found this method to be the simplest for me.