I am attempting to internally redirect all demands to index.php and externally redirect all demands which contain index.php utilizing a .htaccess file.

So Web addresses like http://host/test ought to be processed by index.php and Web addresses like http://host/index.php/test ought to be rerouted to http://host/test after which processed by index.php (without redirecting the browser to index.php)

I attempted the next but always obtain a message "A lot of redirects...":

RewriteRule ^index\.php/?(.*)$ /$1 [R,L]
RewriteRule .* index.php/$0 [L]

You have to consider the URL within the request line to ascertain if /index.php/… continues to be asked for:

RewriteCond %{THE_REQUEST} ^GET\ /index\.php/?([^ ]*)
RewriteRule ^index\.php/?(.*) /$1 [R,L]
RewriteCond $0 !^index\.php($|/)
RewriteRule .* index.php/$0 [L]

Amongst other things, if you wish to get it done without redirecting the browser then you won't want to make use of the [R] option, meaning Redirect the browser.

Do this:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^(index.php/)?.* index.php [L]
</IfModule>