- Login to your cPanel.
- Search for File Manager.
- Click on File Manager icon.
- In the top right hand corner, click on Settings. For the primary domain, click on the Web Root radio button. If you want to change this setting for a addon domain, click on the dropdown and find your desired addon domain name. Be sure the checkbox next to Show Hidden Files is checked. Click the Save button & the browser will return to File Manager screen.
- You should now be in the root folder of the domain you chose. Search for the .htaccess file, right click on it. This brings up a menu. Find and click on the Edit option. If you get a popup box, simply find and click the Edit button in the lower right corner to continue to the editor.
- You are now in the text editor. As most sites are coded with either htm or php, we have include the code for both below.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
7. Make sure that you hit the Save Changes button in the upper right corner to save your new htaccess configuration. Your site should now display the address without the file extension.