Forum Moderators: mack
For instance if I have common info such as an address, or multi-lined text in a table which appears on all pages - what methods can anyone suggest to make changes in one and have all updated at same time?
Or alternatively, how best to search and replace multiple lines of commonly appearing info on pages or in different directories or subdirectories at same time?
I think most web hosts will allow this with normal html pages provided they end .shtml
For that matter, the server can be told to allow .htm/.html files to use includes. This is much easier than changing all the page extensions to ".shtml" (which may also "break" links already listed in search engines, etc), though there can be a downside (see "caveat" below).
The following line in your .htaccess file will do it --
AddHandler server-parsed .html
Caveat: This command (whether it specifies .shtml or .html [and/or .htm, if you choose]) will force the server to parse every page of this type looking for includes. If many of your pages do not have includes, this is a lot of unnecessary, extra work for the server, and will also slow down the serving even of pages that have no includes. So I would only consider this approach if you plan to use includes on most of your pages.
(Also, check with your server before doing this. I think most will allow it, but it's possible some would treat it as a violation of the TOS. Also, if your host does not allow you to set up .htaccess files, you will have to ask them to make sure the server is set up to handle the includes... and it's possible they will tell you they will only do so with ".shtml" files.)