Need to remove the html extension from a site's index.html, for instance, the home page should be rendered as www.abc.com and not www.abc.com/index.html. And for the remaining pages, for instance www.abc.com/contact.html should be rendered as www.abc.com/contact.
Nginx strongly recommends not to use the 'if' directive but a 'return' directive and 'rewrite' as a last resort.
How can we do it the right way?