What
about setting an IsAuthenticated (or something like that)
variable.
In the
file1.cfm page, you would have at the top something like
this:
<Cfif
Session.IsAuthenticated EQ �1�>
Code here
<Cfelse>
<Cflocation template=�Login.cfm�
Addtoken=�No�>
</cfif>
This
way, no matter how many times they access this file directly, if the session
variable is not there then they are always sent to the Login
page.
In the
login page, you would set the variable there. Assuming that you are using some
type of query to authenticate the users:
<Cfif
q_someQuery.RecordCount GT �0�>
<Cflock>
<Cfscript>
Session.IsAuthenticated = 1;
</cfscript>
</cflock>
</cfif>
.
Also,
you may want to set some default parameters in the Application.cfm file, such
as:
<Cfparam
Name=�Session.IsAuthenticated�
Default=�0�>.
Of
course, this is only one of the ways that I do this, and I believe that it is
pretty simple. I am sure you will get other ideas sent to you. Also, on the
CFLOCK tag, I did not add any variables. You would want to do
that
HTW,
Bruce
-----Original
Message-----
From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Javier Flores
Sent: Saturday, June 01, 2002 10:29
PM
To:
[EMAIL PROTECTED]
Subject:
login & password
Hi
everyone!
I would
like to know how to control the files in a folder using login &
password...
1.- I
have a X folder... and in this folder exist... index.cfm, result.cfm and
file1.cfm.
2.- The
people HAVE TO login before see the file1.cfm, they cant access typing
directly in the browse http://domain/X/file1.cfm, before it,
they must login...
3.-
what do I have to put in the first line in the file1.cfm to redirect the
people that is not logged to the login.cfm page?
Thanxs
in advanced...
Javier