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?
views:
89answers:
3
+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
2009-09-14 12:55:47
A:
Name the home page index.html, then it will display as the default for / (given normal apache rules)
John Allen
2009-12-08 16:26:05