Let all files in a database hide the file name?

RewriteRule ^user/order$ user/order.php

because I don"t know how to turn on the words, I can"t find
, so I come to see if anyone knows

.

the one above can rewrite a single php
want to see if you can specify a folder
for example

RewriteRule ^user/*$ user/*.php

in this way, all the php of user faces are removed from the file name, so I don"t need to add one by one?

also check
can I add a special symbol to the network address? For example, admin/-sharpindex-> admin/index.php

Mar.23,2021

user
RewriteRule ^/user/(.+)$ /user/$1.php [PT,QSA,L]
eg:/user/index    ->    /user/index.php


RewriteRule ^/(.+)/(.+)$ /$1/$2.php [PT,QSA,L]
eg:/admin/ttt    ->    /admin/ttt.php

adding-sharp becomes an anchor, which is not recommended.

Menu