CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
CGI-PERL Script for calling Cookie and redirect URL


New User

Jun 17, 2003, 3:47 PM

Post #1 of 2 (2447 views)
CGI-PERL Script for calling Cookie and redirect URL Can't Post

I need your Help with below rewrite engine script to convert it to CGI-PERL script
RewriteEngine On
RewriteLog logs/rewrite.log
RewriteLogLevel 1
RewriteCond %{HTTP_COOKIE} !.*userName.*
RewriteCond %{REQUEST_URI} ^/abc/.*\.htm.* [OR]
RewriteCond %{REQUEST_URI} ^/abc/setup.exe
RewriteRule ^/(.*) http://WebLogic:7001/admin/serveLogin [P]

What this rewrite does is anyone who types URL or it will be redirected to WebLogic server on port 7001 which invokes servLogin page which authenticates username and password from oracle Database and if authentication is successful it allows that particular user to access the link. Also it generates cookies so that as long as his/Her session is valid it wonít be authenticated again. This works but it having a serious performance impact on Web Server ( when this rewrite engine is ON CPU on Web server is always 0.0% idle even if abc link is not in use Donít know Why anything wrong with this rewrite conf? )so we are need to remove rewrite engine and generate a CGI-PERL script which does the same.

Also we canít use htaccess as we need to authenticate from database which are having more than 100 users.

Can anybody suggest or give CGi-PERL script which does the same ? I am using Apache 1.3.26 on Solaris 8.
We need a CGI-PERL script which
1) validates Cookie .*userName.*
2) If cookie is NOT There in Client browser it will re-direct all requests with URL*\.htm.* OR
3) How to Configure Apache 1.3.26 to call this script
Please Help.

Any suggestions will be of great help.
My email ID:

Thanks in advance



Jul 19, 2003, 5:59 AM

Post #2 of 2 (2429 views)
Re: [bshah] CGI-PERL Script for calling Cookie and redirect URL [In reply to] Can't Post

Have you found anyone to write this script for you?


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives