I have the code that answers my original question, but havn’t been able to get any code working that will remove the .html and add a trailing slash.
What worked for me to change the same chunk of code in many files by changing the chunk of code only one time. Use the include function.
In the htaccess file at the top put:
AddHandler application/x-httpd-php5s .php .htm .html
The file containing the master chunk of code has to be a php file, say chunk.php.
The code to be placed in the other files that will duplicate the master chunk of code is
<? php include(‘/home/foldername/public_html/foldername/chunk.php’) ?>
or
<?php include “thedomainaddress/chunk.php” ?>
or
<?php include “chunk.php” ?>
but not
<?php include “/chunk.php” ?> (The / in /chunk.php works differently in php.)
Chris