The condition is simple:
If requested URI does not indicate to any existing file then redirect to ${ENV:BASE}index.php
.
You can find description of RewriteRule flags here. Briefly speaking:
QSA
stands for "query string append". It means that query string will be appended to replacement URI.
L
means that is the last rule and no further rules will be processed.
On this page there is a good explanation for environment variables in htaccess:
The %{ENV:variable} form of TestString in the RewriteCond allows mod_rewrite's rewrite engine to make decisions conditional on environment variables. Note that the variables accessible in mod_rewrite without the ENV: prefix are not actually environment variables. Rather, they are variables special to mod_rewrite which cannot be accessed from other modules.
So, you can use environment variable in your rule like this ${ENV:<name>}
. The variable has to be set earlier, of course.