?
Solved

awstats question

Posted on 2006-11-20
6
Medium Priority
?
627 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

On Microsoft Windows, if  when you click or type the name of a .pl file, you get an error "is not recognized as an internal or external command, operable program or batch file", then this means you do not have the .pl file extension associated with …
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.…
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
Suggested Courses

752 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