How to Remove extensions from URL

URL stands for Uniform Resource locater that is the global address of documents and other resources on the World Wide Web. According to the syntax of URL the primary part of the URL is named a protocol identifier and it indicates what protocol to use, and therefore the second part known as a resource name which state the IP address or the domain name where the resource is located. The resource name and the protocol identifier are separated by a colon and two forward slashes.

1) How to remove the.php extension from the URL?

Ans : You have to add the following code in .htaccess file
Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.php [NC,L]

2) How to remove the.html extension from the URL ?

Ans : Just by adding the following code in .htaccess file
Options +FollowSymLinks
Options +Indexes
RewriteEngine on
RewriteCond %{SCRIPT_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.html [NC,L]
To host any extension based site you will required a good quality web hosting services to run secure site.