To remove the extension for instance .html in example.com/sitemap.html to make it something like example.com/sitemap, add the below codes in your .htaccess file;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.html [NC,L]
Important Note:
If the extension is .php, you will be required to use the last line as RewriteRule ^([^\.]+)$ $1.php [NC,L] instead.
While if your website is using a long URL like example.com/files/folder/sitemap.html, you can change it into "example.com/sitemap" in .htaccess
Modify this line according to your needs and then add this code to your .htaccess file.
RewriteEngine on
RewriteRule ^sitemap/$ /files/folder/sitemap.html [L]
