Solved

Having problem with file

Posted on 2006-10-20
4
156 Views
Last Modified: 2013-12-24
Hello, using a code idea from here:

Creating a user athentication (Login) area.
http://tutorial8.easycfm.com/

I built a file called application.cfm that runs before any other cfm page that I have. The problem is that I have a cfm page that I want people to view but everytime it tries to view it it redirects them to another page. I don't know how to fix this. Here is the code to the application.cfm

<html>
<head>
<title>NVGA Ranking</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>

<!--- Create the application --->
<cfapplication name="Password" clientmanagement="Yes" sessionmanagement="Yes">

<!--- Now define that this user is logged out by default --->
<CFPARAM NAME="session.allowin1" DEFAULT="">

<!--- Now define this user id to zero by default, this will be used later on to access specific information about this user. --->
<CFPARAM NAME="session.allowin2" DEFAULT="">

<cfif session.allowin1 neq "username" AND session.allowin2 neq "password">
      <cfif ListLast(CGI.SCRIPT_NAME, "/") EQ "RankingNVGA.cfm">
      <cfelseif ListLast(CGI.SCRIPT_NAME, "/") EQ "login_process.cfm">
      <cfelse>
      <!--- this user is not logged in, alert user and redirect to the RankingNVGA.cfm page --->
         <script>
                 alert("You must login to access this area!");
                 self.location="RankingNVGA.cfm";
         </script>
         <!--- Now abort the page --->
         <cfabort />
      </cfif>
</cfif>



</body>
</html>

Help!!
0
Comment
Question by:DancingFighterG
  • 2
4 Comments
 
LVL 4

Expert Comment

by:CodeParadise
ID: 17778396
What is the name of the file that you want people to view? Is it 'RankingNVGA.cfm'?
0
 
LVL 13

Expert Comment

by:usachrisk1983
ID: 17778450
Well, it looks like if they're not looking at RankingNVGA or login_process, it redirects them to the login page if they're not already authenticated.  
0
 

Author Comment

by:DancingFighterG
ID: 17779385
I need people to see PlayerView.cfm without being authenticated!!
0
 
LVL 13

Accepted Solution

by:
usachrisk1983 earned 250 total points
ID: 17779932
Add the line:

      <cfelseif ListLast(CGI.SCRIPT_NAME, "/") EQ "PlayerView.cfm">

After the existing cfelseif line.
0

Featured Post

Give your grad a cloud of their own!

With up to 8TB of storage, give your favorite graduate their own personal cloud to centralize all their photos, videos and music in one safe place. They can save, sync and share all their stuff, and automatic photo backup helps free up space on their smartphone and tablet.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now