« Feedshake | Main | 9Rules hiring bloggers »

July 25, 2005

Website Setup Tips

Do you know what you're going to do with your website next month? How about next year?

Don't feel bad if you can't answer that question. Most of us don't.

The first thing you might want to do (provided you are on a professional hosting account) is setup your site so that pages with an *.html file extension are SSI (Server Side Includes enabled) You can do this by editing a file called .htaccess that typically sits in your root directory. If there isn't one there, then you can create one from Notepad. To enable html pages to be parsed for SSI add these lines to the .htaccess file:

AddType text/html .html AddHandler server-parsed .html

This allows you to use SSI on all of your web pages that have an .html extension. Even better, if for some reason you wanted to include the output from a PHP script, you can use a SSI include file. The server will recognize the file with the .php extension being called into the SSI include, and execute the php script before sending it to the browser.

If you would like to see an example of this click here. Note the right hand side where it says "Latest News?" That is an example of using Carpe which enables you to parse an RSS feed and display it in a php file. The Php file is being pulled into the template using SSI.

Yes, you may not need this functionality when you are setting up a new site, but as soon as you start adding content to it, you will see how much easier it is to update one file when you want to change a menu than updating 100 files to change a menu.

Never add a webpage to your site with an *.htm extension.

I know, on past websites, you may have mixed and matched files with both .html and .htm extensions. Don't do it on any new sites. The .htm extension can become your ace-in-the-hole.

If something happens you need to have the ability to turn the first page someone sees on your site into a CGI script, that's what you are saving the .htm extension for.

To do this you would add this line to your .htaccess file:

AddType application/x-httpd-cgi .htm

Now if you do this later on when the site has already been built, and people have already bookmarked your site as www.yourdomain.com/index.html, you can modify your .htacess file like this:

Redirect permanent /index.html http://yourdomain.com/index.htm

See once you remove the index.html (if that is what your site defaults to) the server will load "index.htm" by default, that could be your CGI script.

One precaution. You need to make sure your are hosted by a provider that allows CGI scripts to be executed outside the of the CGI bin.

If you these tips in mind when setting up a new website, you will be ready for anything.

Got a tip you would like to post here and share?

Posted by Steve MacLellan at July 25, 2005 04:22 PM

Trackback Pings

TrackBack URL for this entry:
http://www.homebusiness-websites.com/mt/mt-tb.cgi/223

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?