- Create .htaccess file in the root directory of your web.
- Write into the file:
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^([^\.]+)$ $1.html [NC,L]
- FOR HTML ONLYRewriteRule ^([^\.]+)$ $1.php [NC,L]
- FOR PHP ONLY - Save the file.
- Adjust all hyperlinks on your website – delete all html (htm) and php extensions.
- Done.