I'm trying to set environment variables in my .htaccess file based on the top level domain of the server. But after there is a match for the condition, the .htaccess file does not execute further.
If there is no domain matched,_rooturl_ is set but _rootfolder_ is not. However, when a domain is matched _rootfolder_ is set but _rooturl_ is not. This also applies to any other redirects defined after that.
(...)
<If "req('Host') =~ /domain.com/ || req('Host') =~ /localhost/">
RewriteRule .* - [E=_rootfolder_:www.domain.com]
</If>
<If "req('Host') =~ /domain.de/">
RewriteRule .* - [E=_rootfolder_:www.domain.de]
</If>
RewriteRule .* - [E=_rooturl_:domainname]
(...)
TL;DR, I want my code to execute after passing the IF conditions.