Hey Louie,
Your comment about your previous host intrigued me so I started playing around and I think I've figured out how they did it. To implement the extension .phps as a source highlighting extension you need to do the following:
1) Change the AddType definition for .phps files from:
AddType application/x-httpd-php-source .phps
to:
AddType application/x-httpd-php .phps
and restart Apache to allow the server to detect the configuration change.
2) Place the following script into a file (preload.php for example), edit the $path variable to reflect the document root of your Apache installation, and put it in the root of your includes folder (specified in the include_path directive of php.ini):
<?php
// explode the path of the requested URL at the extension
$foo = explode(".", $REQUEST_URI);
// if the extension is 'phps'
if ($foo[1] == 'phps'){
// read Apache's document root to variable
$path = 'd:/apache/htdocs';
// construct the path to the requested source file into variable
$file = $path.$REQUEST_URI;
// highlight the file
highlight_file($file);
}
// else load the file
else{
}
?>
3) Change the auto_prepend directive of the php.ini to:
auto_prepend = preload.php
Effectively what this does is force php to evaluate the extension of every php file it is passed. If the extension of the file is .phps, the file is passed to the highlight_file() function for output. If the extension is anything else, the file is parsed and executed as normal. Hope this helps!!
Cheers,
Geoff A. Virgo