Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Is it possible to run CF commands inside an HTML file by updating Apache configs/htaccess file? When I searched online, I didn't come across any answers for CF, saw several posting for PHP (perhaps I am not searching for the right terms ... ?).

Specifically, we have CF 6 (I know, don't say it) on Solaris, and Apache 2, and was thinking of using this line:

AddType application/x-httpd-coldfusion .html

so we can use cfinclude inside the HTML files, but this did not work. Your time, ideas and thoughts are much appreciated!

KM

share|improve this question

1 Answer 1

up vote 5 down vote accepted

You'd want to add .html to the AddHandler directive in the configuration for your Apache server:

AddHandler jrun-handler .jsp .jws .cfm .cfml .cfc .cfr .cfswf .html

If you run multiple sites on this ColdFusion server, you should probably look to do this just for the site in question and not server-wide. You'd add a lot of load to the server if you have it parse all HTML files looking for CFML instructions.

share|improve this answer
    
Thanks @bpanulla! –  KM. Jan 11 '11 at 1:44

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.