I appreciate the advice, but I was looking for a way to modify the above php script. If I use the apache directive, it won't use my system template.
The script above is the index.php file. It uses the system template for the layout, header, footer, menu, etc. It gets the body from the database.
It also uses the .htaccess file to change index.php?page=page1 into page1.html
#Page Manager
RewriteRule ^([^/\.]+).html?$ index.php?page=$1 [L]
If you visit http://www.domain.com/page1.html, it will look for urlname in the database called page1. It will then display the contents ($body) from the urlname of page1.
If you go to http://www.domain.com without a page, it will automatically use the urlname of index. It will then display the contents ($body) from the urlname of index.
What I am trying to do is create a table with the urlname 404 in the database. So, if someone goes to http://www.domain.com/page45.html and page45 does not exist as a urlname in the database, it will use the $body of urlname 404 instead.
I hope this makes sense.
Thank you in advance for any help provided.
Eddie