We want to do the following:
1. A page is requested on a web site (PHP, Apache)
2. If the page is not there, the .htaccess triggers a special PHP page (one single page that processes the requests for any pages that are not found)
4. The PHP looks at the referring URL that requested the page. If there is no referring URL, it serves up a 301 redirect to the home page
5. If there is a referring URL, the PHP pulls the content from that page and looks for the anchor text that was used for the link to that page
3. The PHP pulls a content template and inserts that anchor text as a key word in the content and serves up a page with that content.
So we will need
* the .htaccess page
* the PHP page
* an HTML template file that the PHP file uses for the main content, with placeholders where the keyword content goes
* we will also need some randomization on the page so that the templates all don't look alike.