View Single Post
Old 10-21-2012, 07:31 PM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,585
Thanks: 5
Thanked 864 Times in 841 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote