A note for future reference: saving CFML or PHP sample scripts with a .txt extension after the .cfm or .php extension so that they can be displayed as text in the browser doesn't work on Apache servers. Apache doesn't just look at the last extension in the filename, it looks at all of them that have handlers specified, the next matching extension overriding the previous. So if there isn't a .txt handler, a file named like sample.code.php.txt will be parsed by the PHP engine.
There is a way around this issue; you can use the SetHandler directive instead of the AddHandler directive:
<FilesMatch \.cgi$>
SetHandler cgi-script
</FilesMatch>

Post a comment