Main Content

How to avoid duplicating web page maintainance

Archive - Originally posted on "The Horse's Mouth" - 2008-12-20 11:18:49 - Graham Ellis

How do you move from a web site with a single static page to a web site with a thousand pages (URLs) without multiplying your maintainance work by a thousand? Such is the critical importance of being able to do this that there are many schemes available - many solutions - and virtually every site that's more than a single shop front window uses them. Here are some of the techniques:

Scripted Content Generation Where a program that's run whenever [part of] the web site is updated regenerates the individual static .html files.

Site Management Programs Where a static .html page is generated by a program that a content provider submits.

Style Sheets Where the look and feel that's been developed for one page is carried across many others.

Include Files Where a page is held on the server in "HTML++" - that's html with extra bits such as SSI, PHP, ASP, JSP, Mason, Rails which are interpreted by the server before it's passed to the browser allowing a single piece of content to be maintained for insertion in many pages

URL rewriting Where a whole number of apparently different static .html pages are actually served by a single page or program that produces a response based in part on the name of the page to be served.

Under the Apache httpd web server, URL rewriting is performed by mod_rewrite. See mod_rewrite for newcomers for further details of this (that's really the second part of this article)