将域后的所有内容路由到index.php?

I'm using this .htaccess file but it doesn't work:

Options +FollowSymlinks
RewriteEngine on

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

What I see in Apache error log is [Error: Over 10 times of redirecting internally]. I added the flag 'L' in RewriteRule but it doesn't stop after the first time matching the rewrite rule.

If you are running v2.2.16+ then use FallbackResource, see: https://httpd.apache.org/docs/2.2/mod/mod_dir.html#fallbackresource

FallbackResource /index.php

The alternative is to use mod_rewrite and the code should be as follows:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]