RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]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.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.