Solved

Having problem with file

Posted on 2006-10-20
4
144 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
Comment Utility
What is the name of the file that you want people to view? Is it 'RankingNVGA.cfm'?
0
 
LVL 13

Expert Comment

by:usachrisk1983
Comment Utility
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
Comment Utility
I need people to see PlayerView.cfm without being authenticated!!
0
 
LVL 13

Accepted Solution

by:
usachrisk1983 earned 250 total points
Comment Utility
Add the line:

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

After the existing cfelseif line.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

14 Experts available now in Live!

Get 1:1 Help Now