How could you mass add links to a bunch of static html pages based on text in the html like say I want every instance of the word dog to link to a dog page on a site, I mean it would be really simple to either do a mass find and replace using a text editor, or if I loaded the site into db But is there a way to do it on the fly at the server level?
Since you have a static site, I'll assume you don't want your page extensions to change and that you don't want to break existing links. One approach that could work is something like the following: 1. Use mod_rewrite (assuming Linux) to rewrite your URLs so that they can be routed through a PHP page (or a page in some other scripting language). For example, yourdomain.com/dir/pagename.htm could be rewritten as yourdomain/link_stuffer.php?file=/dir/pagename.htm 2. Your PHP script (link_stuffer.php in the example above), would get the page name from the query param, read the static file from disk, generate links on the fly and return the content to the user.
Not sure about this, but I first think about using javascript (you have to add small script on every static page, or configure apache to add to each .html this script to the end). This script will traverse every <p> or whatever element on the page and rewrite phrases to <a> link.
yeah maybe javascript, I was kind of trying to do what that intellitext affiliate does but add links of my choice