there is code .htaccess
RewriteEngine On RewriteRule ^(\w+)$ $1.php [NC] It allows you to access the pages without appending the .php file extension.
we also need a line that will hide the .php extension from the url if the user enters example.com/about.php there are also many links that lead to example.com/about.php , the link is not an option, therefore the line that will hide the extension in url if there is one.