Description of the problem – if you add a standard redirect from index.php to the root of the site, this rule will by default apply to the site admins. For Joomla and Вitrix, the result will be the inability to log in to the admin panel, because the index will be redirected to the root of the site.
Here is an example of a redirect for Bitrix from index.php except the /bitrix/ folder:
RewriteCond %{REQUEST_URI} ^(.*)index\.php$ [NC] RewriteCond %{REQUEST_URI} !bitrix [NC] RewriteCond %{REQUEST_METHOD} get [NC] RewriteRule ^(.*)index\.php$ %1 [R=301,NC,L]
A similar example for a Joomla redirect from index.php except the /administrator/ folder:
RewriteCond %{REQUEST_URI} ^(.*)index\.php$ [NC] RewriteCond %{REQUEST_URI} !administrator [NC] RewriteCond %{REQUEST_METHOD} get [NC] RewriteRule ^(.*)index\.php$ %1 [R=301,NC,L]