Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Having problem with file

Posted on 2006-10-20
4
Medium Priority
?
199 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

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…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

636 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