Solved

Having problem with file

Posted on 2006-10-20
4
166 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

776 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