Skip to main content
Participant
August 29, 2007
Question

Using the .html extension with CF

  • August 29, 2007
  • 3 replies
  • 600 views
How do I setup CF admin to interpret the .html extension as opposed to .cfm?

Thanks!
    This topic has been closed for replies.

    3 replies

    Inspiring
    August 30, 2007
    See if this works, never tried it:

    http://cfblog.com/dave/index.cfm/id/parsing_htm_files_as_cfm_on

    --
    Ken Ford
    Adobe Community Expert
    Fordwebs, LLC
    http://www.fordwebs.com


    "BigRedFan" <webforumsuser@macromedia.com> wrote in message news:fb4poa$iq$1@forums.macromedia.com...
    > How do I setup CF admin to interpret the .html extension as opposed to .cfm?
    >
    > Thanks!
    >
    BigRedFanAuthor
    Participant
    August 29, 2007
    Thank Ian!

    I incorrectly worded my question. I don't want to get rid of .cfm, just add .html. I am using Apache and edited httpd.conf by adding .html to the following line:

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

    I also edited WEB-INF\web.xml with the following:

    <servlet-mapping id="macromedia_mapping_14">
    <servlet-name>CfmServlet</servlet-name>
    <url-pattern>*.html</url-pattern>
    </servlet-mapping>
    <servlet-mapping id="macromedia_mapping_15">
    <servlet-name>CfmServlet</servlet-name>
    <url-pattern>*.html/*</url-pattern>
    </servlet-mapping>

    After making both those changes I get a 500 Internal Server Error.

    Any ideas?

    Thanks!



    Inspiring
    August 29, 2007
    BigRedFan wrote:
    > How do I setup CF admin to interpret the .html extension as opposed to .cfm?
    >
    > Thanks!
    >

    As opposed? You want to stop the server from interpreting .cfm files?
    Most who use this technique set it up to do both .cfm and .html! :-)

    Anyways, this is not a CF admin configuration, it is a web server
    configuration. That is what is determining what resource has been
    requested and what to pass the request to, if anything. So your answer
    is going to depend on what web server you are using, IIS vs Apache vs
    something else.

    I don't know off the top of my head, but I have read many postings and
    blogs over the years that give a good description of the process, should
    be pretty easy to find with a Google search.

    P.S. Now that I think about with MX versions of ColdFusion I seem to
    recall there are some cf xml configuration file modifications involved
    as well.