?
Solved

Having problem with file

Posted on 2006-10-20
4
Medium Priority
?
191 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 1000 total points
ID: 17779932
Add the line:

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

After the existing cfelseif line.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

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 …
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

762 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