How to write a file so that the .php file in a folder ignores the file name when it is accessed?

RewriteRule ^admin/user$ admin/user.php

the only thing I can write now is this hidden method
to create one file at a time

and then put it in / .htaccess in the root directory of the website
, but what I want to implement now is that all the php files in "some folder" ignore the file name, and do not have to build one by one?

for example, there are 50 .php > scripts

in a folder.
/test/1.php
/test/2.php
/test/3.php ....
/test/50.php

how to hide the file name in test? Scripts that don"t affect other folders?

I thought it was written like this

RewriteRule ^test/([^./]+)/?$ test/$1.php [L]

but it doesn"t seem to be


RewriteRule ^test/([\w\-]+)$ test/$1.php [L]
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-1b31161-2b2b2.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-1b31161-2b2b2.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?