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?
jdeline - 30 May 2006 20:21 GMT
Application.cfm will only run prior to a .cfm page. Why cant you include
index.cfm in your link ow whatever? <a target=_blank
class=ftalternatingbarlinklarge
href="http://www.myClientSite.com/index.cfm.">http://www.myClientSite.com/index.
cfm.</a>
JMGibson3 - 30 May 2006 20:40 GMT
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.
sampsas23 - 30 May 2006 20:48 GMT
Thanks for your replies.
I can't use <a target=_blank class=ftalternatingbarlinklarge
href="http://www.myClientSite.com/index.cfm">http://www.myClientSite.com/index.c
fm</a> 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.
Kronin555 - 30 May 2006 20:56 GMT
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
<a target=_blank class=ftalternatingbarlinklarge href="http://www.mydomain.com/
Now,">http://www.mydomain.com/
Now,</a> if they directly request
<a target=_blank class=ftalternatingbarlinklarge
href="http://www.mydomain.com/index.htm
you'll">http://www.mydomain.com/index.htm
you'll</a> need to do a meta refresh in that page.
sampsas23 - 30 May 2006 21:06 GMT
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.
Adam Cameron - 31 May 2006 00:29 GMT
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.

Signature
Adam
drforbin1970 - 31 May 2006 14:52 GMT
>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" ?
sampsas23 - 31 May 2006 18:32 GMT
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.cfm. 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.