You may wish to start out using separate folders for each page, thereby having the shorter URLs of:
www.example.com/
www.example.com/cat/
www.example.com/dog/
regardless of how small your site is now. This is accomplished by placing a file named index.html in each folder (directory).
Pros:
Shorter address -- www.example.com/cat/ not www.example.com/cat.html
You don't break existing links by changing from HTML to PHP or other scripts
You don't have to edit all of your internal links to accommodate the changes.
I use the DirectoryIndex in my .htaccess to reflect my default page name:
Code:
DirectoryIndex index.html index.php index.shtml
You can place as many names in there as you like, all on one line. If two default files exist in the same directory, as in index.html and index.php, the one that is listed first in the DirectoryIndex prevails.
=====
This is optional, but I have replaced "index" as the base name of my default page. In most cases, I have named the file after the directory name, so when I am editing files my editor's Recent Files list is not full of "index.html." To make that work, I use a DirectoryIndex entry in my root .htaccess that lists all of the directory names + .html (or .shtml, .php, etc. as needed).
|