The only security that is possibly added is that nobody will know what programming language and or server you are using by telling through the file extension. But generally this isn’t primarily done for security but for SEO reasons and is commonly known as “pretty URLs” or “search engine friendly URLs”.
There are two ways to do it, one that requires a change in the server configuration or .htaccess file and one that doesn’t but makes file management a little more laborious.
The second one goes like this: You create a dedicated directory for each page and put the actual HTML file as “index.html” (or index.php or whatever extension you have) in it. Browsers will always look for a file called index.* if no file name is provided. So the file structure would look like this:
Code:
index.html – this is the site’s home page
/about
index.html
/contact
index.html
…
…
You can then access the pages at
http://example.com/about, for example, and it will load
http://example.com/about/index.html automatically.
For the other – preferred – approach read this
tutorial.