Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping login on my site

Status
Not open for further replies.

Pandyon

Programmer
Feb 21, 2001
38
0
0
US
I have a login form (enter.cfm) that submits to a page that checks the login (check_login.cfm). Some people have written their own page code on their own site, so it goes to my page (check_login.cfm) that checks the login, without them having to go to my own login page.

Is there a way I can disable that? Force people to go to my login page (enter.cfm) if they want access?

Probably an easy answer, but I've been working a lot in .NET lately, and not much in coldfusion, so its' out of my head.
 
<cfif HTTP_REFERER EQ "enter.cfm">
<cflocation url="check_login.cfm">
<cfelse>
some error page, or another <cflocation> tag
</cif>

Or you can use other CGI variables ( to check the full http path to make sure they came from your site and not another page named "enter.cfm"

_____________________________
Just Imagine.
 
Don't you create some sort of session struct after check_login.cfm? You can say something like:

<cfif NOT IsDefined("SESSION.Auth.IsLoggedIn") >
<cfif IsDefined("FORM.UserLogin")>
<cfinclude template="check_login.cfm">
</cfif>
<cfinclude template="enter.cfm">
<cfabort>
</cfif>

to force each user to login...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top