You have to use a URL rewrite engine, edit (or create) the .htaccess like that:
# Remove .html from url
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.html -f
RewriteRule ^(.*)$ $1.html
For more details: Remove .html from URLs with a redirect