Is it possible, using .htaccess, to append a certain file to all php files from the entire site? I'm thinking about adding a statistics.php to all php files, without manually including the statistics.php in every php file.
You could do a wildcard internal redirect to another php file which then includes both the stats file and the file requested by the user. MAybe something like this in .htaccess rewriteengine on rewritebase / rewriterule (*.)$ global.php?file=$1 [nc,l] Code (markup): In global.php <? include ("stats.php"); include($_GET['file']); ?> PHP: