I was to remove .php extension by using
RewriteEngine On
RewriteRule ^([^\.]+)$ $1.php [NC,L]
but this introduced a problem which is i can't access to folder directories and their internal files and server is not even accepting trailing slash at the end.
so lets i visit this page
www.example.com/family
url will load fine
if i visit this page with / at the end
www.example.com/family/
note i have trailing slash / at the end, it won't work
now if i have a directory or folder name family
www.example/family
which is directory instead of my page then page will not work nor the directory or folder will be accessible.