Skip to main content
Participating Frequently
October 17, 2007
Question

Index.cfm file

  • October 17, 2007
  • 2 replies
  • 10081 views
Hi ,

I am new to coldfusion and i would like to have the following items clarified.

1) Why we need to have Index.cfm file

2) What is the diff between Application.cfm and Application.CFC

I removed the index.cfm file from directory and accessed the application and I don't find any difference

Pls advice.

Thanks,
Rams
    This topic has been closed for replies.

    2 replies

    October 17, 2007
    Just to clarify/expand on the previous answer - the index.cfm file allows you to access a URL without actually specifying the file name. That is, if you point your browser to www.mydomain.com/ then the server will look for a default file in the root directory. The default file is typically index.html or default.html as stated previously. On a web server using CF files it is often index.cfm. The actual name of the default file is specified in the web server such as IIS on Windows servers.

    If you specify a URL such as the above without specifying the filename and there is no default file it will produce an error.

    If you do specify a filename in the URL - www.mydomain.com/main.cfm - then the existence of the default file is not an issue.

    Ken
    Inspiring
    October 17, 2007
    regarding index.cfm. It's the equivalent of index.html or defaul.html. You don't really need one, but, if you don't have one you'll have url issues later on.

    application.cfc is an upgrade from application.cfm. Both will work, but application.cfc gives you more flexiblity in determining when code gets executed.