Why did thinkphp (3.2.3) URL jump with more index.php??

< H2 > Apache server < / H2 >

config file configuration is like this

"URL_HTML_SUFFIX"=>"html",
"URL_CASE_INSENSITIVE" => true,
"URL_MODEL" => 2,
"URL_ROUTER_ON" =>true,

.htaccess file configuration is like this

<IfModule mod_rewrite.c>
  Options +FollowSymlinks
  RewriteEngine On
  
  RewriteCond %{REQUEST_METHOD} ^TRACE
  RewriteRule .* - [F]

  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
  
  RewriteCond %{HTTP_HOST} ^xxx.cn [NC]
  RewriteRule ^(.*)$ http://www.xxx.cn/$1 [L,R=301]
</IfModule>


< hr >

the problem is this:

at present, through xxx.cn, you can jump to other non-home page links in www.xxx.cn,. After redirecting, index.php, will increase. It has been tested that index.php can be accessed normally without this index.php. It is hidden, but
for non-home page links such as xxx.cn/home/test/test/, the jump will become www.xxx.cn/index.php/home/test/test/
Why there is more index.php?. How to get rid of this index.php?

Feb.28,2021

did you use tp's U method to generate link addresses? If so, the reason is that index.php is the entry file for tp, and its role is to load all the resources needed for tp to run. Without index.php,tp, the request cannot be processed properly! When you configure the apache rewriting rule, but tp does not know that you have configured this rule, it is necessary to generate an access url, with index.php so that it can be handled normally on the next request. In this case, otherwise you can manually add the access address yourself: for example, U ("User/Login") is replaced with / User/Login

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bd4e4a-53b94.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bd4e4a-53b94.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?