You need a hosting package that supports PHP or ASP or some sort of a server side scripting language.
So assuming your hosting package supports PHP - which most of them do these days, even the Windows-based ones, you must do something like this.
Say your pages are similar to the following - this is very simplified:
|
Code:
|
<html>
<head>
Your style and javascript includes etc.
</head>
<body>
<div id="header"> ... </div>
<div id="menu"> ... </div>
<div id="content">
... a lot of stuff here ...
</div>
<div id="footer"> ... </div>
</body>
</html> |
Now, I will show you how to do what you want with this simplified code using PHP.
1 - We will need to create two PHP files, header.php and footer.php
header.php
|
PHP Code:
|
<html>
<head>
Your style and javascript includes etc.
</hea>
<body>
<div id="header"> ... </div>
<div id="menu"> ... </div>
<div id="content">
|
footer.php
|
PHP Code:
|
</div>
<div id="footer"> ... </div>
</body>
</html>
|
As you can see, the header, contains all the parts in the header and footer contains all the files in the footer, these are always the same so they are going into two files header.php and footer.php.
2 - No we need to create files for the variable/changing portion of the pages, so let's create the index.php file:
index.php - This will be the front page of your site by default, just like index.html, but you must remove index.html (or index.htm)
|
PHP Code:
|
<?php include 'header.php'; ?>
... a lot of stuff here ...
<?php include 'footer.php'; ?>
|
Now let's create an about page:
about.php
|
PHP Code:
|
<?php include 'header.php'; ?>
<h1>About Us</h1>
... a lot of stuff here ...
<?php include 'footer.php'; ?>
|
And so on...
I hope this makes sense and please let me know if you have any questions...