[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

awstats question

Posted on 2006-11-20
6
Medium Priority
?
630 Views
Last Modified: 2008-02-01
Hello,

 I am trying to add authentication to my awstats.pl page. I already have the authentication script in my asp.net page. I want to check if the cookie is set in awstats.pl page, if not redirect user to the login.aspx page. I am not familiar with perl, any help would be helpful,


thanks
0
Comment
Question by:tamilgirl77
[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
  • 3
  • 3
6 Comments
 
LVL 18

Accepted Solution

by:
Morcalavin earned 2000 total points
ID: 17979983
use CGI;
$cgi = new CGI;
$cookievalue = $cgi->cookie('cookiename');
if($cookievalue ne "thevalueyouwant") {
     print redirect('http://yoursite/login.aspx');
}
0
 

Author Comment

by:tamilgirl77
ID: 17980050
Hello,

 Thanks for your reply. It gives me following error:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers.
0
 
LVL 18

Expert Comment

by:Morcalavin
ID: 17980080
Where are you putting it in your the awstats.pl page.  It will need to be present before any header information is sent to the browser.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:tamilgirl77
ID: 17980152
Actually, I am not familiar with any perl. So I added the code at the top of the page. Can you tell me where exactly i should add this code,

thanks
0
 
LVL 18

Expert Comment

by:Morcalavin
ID: 17980200
I'm not sure.  I'm not familiar with awstats.pl code and how the are handling the html.
0
 

Author Comment

by:tamilgirl77
ID: 17980472
Thank you Morcalavin, with trial and error i got the code to work,

Thanks for your immediate help,
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

650 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