Making your MainPage template your default home page

Using simple tools of trade, you can make your mainpage template the main page.

- Ellison Belt

Jan 11, 2001- The whole point of having a home page is to give visitors an easy and common sense entrance to your web site. A good home page will contain easy to read navigational elements, a few featured items or services, fast-loading graphics, and other important in-roads to your online presence- basically- everything a visitor needs to see about your business. Statistically, you have exactly 4.3 seconds to convince your visitors that you are the solution they are seeking...if you are unsuccessful, they will leave and look elsewhere. Creating a good home is your department....I'm not going to focus on that. What I will focus on is how EDatCat can help.

In your templates directory is a template called "mainpage". This is the template that is called into play whenever the store script is called directly or the user_action=link&link=mainpage function is used. The purpose of the mainpage template is to provide a simple store entrance. The advantage of using this template as your store entrance is that it contains all of those dynamic elements such as featured products, category links, and others which your clients can maintain from the admin menu without bothering you to update their static index.html page. Using a simple tool of the trade, you can make your mainpage template the default home page of your web site.

As an example, go to (will open in a new window). This is a site I did for a client who likes to make frequent updates to her site. You will notice that simply going to her home page automatically calls the EDatCat store script and displays the mainpage template. Smooth, huh? Now, she can change her featured products and other vital information and have it automatically update to the home page. How did I do that? Simple...

I used a .htaccess file in her root web directory. .Htaccess files can be used for a variety of purposes such as setting requirements for username/password to enter a directory, setting default error messages, setting the rules for how different files will be treated (such as treating a file with the extension .cool as .gif file, displaying it as an image), and, of course, as we are discussing here, redirect hits to one page in a different direction.

To accomplish this, I placed a simple text file named ".htaccess" in the root web directory. The file contains a sinlge line in the format of:

redirect URL URL-to-go-to

So, in other words:

redirect /index.html

This requires that all visitors trying to view the page be automatically redirected to the store waits, delays, or meta-refresh tags.

This may not work in all browsers, so I would suggest keeping your index.html file in place with perhaps a link or a meta-refresh tag leading to your store script for the benefit of users who arrive there.

In addition, using redirects- and even meta-refresh tags that refresh too quickly- can play havoc with the process of obtaining search engine listings. A site was recently banned from InfoSeek after submitting a link to a page that was set to redirect. I can't blame InfoSeek here...with the overwhelming amount of irrelevant muck on the Web, I'm always careful to note the URL of a listing on any search engine before I visit. As a general rule, I normally dismiss anything with an AOL or Geocities address. Yet, how many times have I clicked a link to something as innocent as a link to a site about raw honey (that's unprocessed for those of you who might wonder) only to wind up at a site entitled "XXX Honey's in the Raw". Hmmm....clever use of doorway pages and .htaccess have to at least give them that much, however annoying it may be.

The solution to this is to not register this page with search engines. You can also use a robots.txt file to disallow search engine spider-bots from indexing the page you are redirecting.

That about covers it. I'm sure some of you will immediately begin a search for raw honey, so I won't keep you. However, keep the above notes in mind when you get ready to make your mainpage template your actual main page.