在Profile.php上隐藏参数并在页面上启用斜杠

Let website link is www.abc.com I have 2 PHP Files.

home.php profile.php

  1. I want to remove .php and place slash on end
  2. profile.php url (before - "www.abc.com/profile.php?id=no1") to "www.abc.com/user_name" (or "www.abc.com/abrar" or "www.abc.com/jahin" or "www.abc.com/piash" like this)
  3. I want to add slashes also on profiles "www.abc.com/user_name/"

    I am currently using this htaccess config but when i put slahes on www.abc.com/user_name it makes error

    RewriteEngine on
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^([^\.]+)$ $1.php [NC,L]
    
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME}.php !-f
    RewriteRule ^(.+)$ /profile?uid=$1 [L,QSA]
    

I am using RAW PHP.

Can anyone help me please?

Thanks in advance.