Skip to main content
Inspiring
May 30, 2006
Answered

Force Application.cfm to run

  • May 30, 2006
  • 7 replies
  • 894 views
Is there anyway to force the application.cfm to run, when the order of sequence for the webserver is index.htm and then index.cfm?

Basically the client wants anyone going to a certain URL to see a different page then the index.htm that is there. The ISP already said they will not point a domain to a particular folder we want.

I can't find anything that will run ahead of a htm page.

Any ideas?
This topic has been closed for replies.
Correct answer sampsas23
Thanks guys for all your responses.

Unfortunately our webhost refuses to do customer specific requests like changing the order of the page loads so that index.cfm is process before index.htm. I still don't see why our webhost won't point an IP to a folder we want within our directory structure.

Maybe I didn't make myself clear. Basically the client has 3 domains. One domain is pointed to the folder and the index.htm is geared strictly to that domain. Domains 2 & 3 are completely different content based and the client wanted those 2 domains to go directly to one of his folders within his directory structure. Our webhost won't do anything customer specific like that.

So in the end the client decided to move the domains to another domain registrar where "domain gripping" can be done.

7 replies

sampsas23AuthorCorrect answer
Inspiring
May 31, 2006
Thanks guys for all your responses.

Unfortunately our webhost refuses to do customer specific requests like changing the order of the page loads so that index.cfm is process before index.htm. I still don't see why our webhost won't point an IP to a folder we want within our directory structure.

Maybe I didn't make myself clear. Basically the client has 3 domains. One domain is pointed to the folder and the index.htm is geared strictly to that domain. Domains 2 & 3 are completely different content based and the client wanted those 2 domains to go directly to one of his folders within his directory structure. Our webhost won't do anything customer specific like that.

So in the end the client decided to move the domains to another domain registrar where "domain gripping" can be done.
Inspiring
May 30, 2006
You should be able to get your webserver to re-write .htm URLs to redirect
to a .cfm URL with the original filename as a URL parameter (so you don't
lose track of the original intent, and include/process the original file
too).

You can also configure the webserver to pass .htm requests to the CF
server, in the same way it's been told to pass .cfm requests. Then the
Application.cfm should be executed.

Or just get the webserver to return a 301 on all .htm requests, and
redirect to the correct/new URL. This is perhaps the (theorethical) best
approach.

--
Adam
sampsas23Author
Inspiring
May 30, 2006
I want to remove the index.htm - but the client has already pages that have links pointing to index.htm and the site has been around for awhile. So I really didn't want to touch his index.htm page, if possible.

But looks as though, I will do a meta refresh on it. Too bad I can't restrict the refresh to only be if it is a certain URL. But then I would have to use javascript.
Inspiring
May 31, 2006
>>But looks as though, I will do a meta refresh on it. Too bad I can't restrict the refresh to
>> only be if it is a certain URL. But then I would have to use javascript

I'm not quite understanding this. Your client has links, say on other sites, pointing to their index.htm file and you can't delete it, right? If so, the refresh mentioned here should solve your problem. What exactly do you mean by:

"Too bad I can't restrict the refresh to only be if it is a certain URL. But then I would have to use javascript" ?


Participating Frequently
May 30, 2006
I may not be fully understanding your problem, but why not just remove the index.htm file? If there's an index.cfm file, then by removing the index.htm file you force the index.cfm file to be returned when the user requests
http://www.mydomain.com/

Now, if they directly request
http://www.mydomain.com/index.htm
you'll need to do a meta refresh in that page.
sampsas23Author
Inspiring
May 30, 2006
Thanks for your replies.

I can't use http://www.myClientSite.com/index.cfm because the domain registrants won't add a page reference to their listing. I don't even know when you register a domain if it can be done.

As for the meta tag refresh, thanks I was starting to lean that way. Looks like it might be the only option.

Participating Frequently
May 30, 2006
You could do a redirect:
<HTML>
<head>
<META HTTP-EQUIV="Refresh" CONTENT="0; URL=http://wherever/whatever/xxx.cfm">
</head>
</HTML>

and the destination cfm could CFLOCATION to the desired destination. Be aware (loops) that if you CFLOCATION from within application.cfm to a destination that's also a .cfm, application.cfm will immediately fire a second time.
May 30, 2006
Application.cfm will only run prior to a .cfm page. Why cant you include index.cfm in your link ow whatever? http://www.myClientSite.com/index.cfm.