views:

89

answers:

3

Using htaccess I was able to hide the file extensions, making it /home instead of /home.html. However, for the homepage, I would like to hide the file name altogether, for example stackoverflow.com, instead of stackoverflow.com/home. How do I achieve this?

+5  A: 

You'll need to look into using a rewrite engine.

From Wikipedia:

A rewrite engine is software that modifies a web URL's appearance (URL rewriting). Rewritten URLs (sometimes known as short or fancy URLs) are used to provide shorter and more relevant-looking links to web pages. The technique adds a degree of separation between the files used to generate a web page and the URL that is presented to the world.

More specifically, it depends on the web server you're using. Here's a guide to URL Rewriting in Apache, for example.

Donut
A: 

Name the home page index.html, then it will display as the default for / (given normal apache rules)

John Allen
+1  A: 

See DirectoryIndex:

DirectoryIndex home.html
Sinan Ünür