Create a file at the root of your web server called “.htaccess”. Put the following code inside:
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule .* $0.php
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule .* $0.php
This will make it so you can access all your PHP pages without having to type the “.php” extension the URL or your <a href>s. i.e., you can access “yoursite.com/about.php” just by going to “yoursite.com/about”. The actual file names should still have the .php extension though. You can do this with whatever file type you like too.