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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

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

 



bshah
New User

Jun 17, 2003, 3:47 PM

Post #1 of 2 (1448 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 http://mydomain.com/abc or http://mydoamin.com/abc/setup.exe 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 http://mydomain.com/abc/.*\.htm.* OR
http://mydoamin.com/abc/setup.exe
To
http://WebLogic:7001/admin/serveLogin
3) How to Configure Apache 1.3.26 to call this script
Please Help.

Any suggestions will be of great help.
My email ID: bshah@citadon.com

Thanks in advance

BS


microwebber
Novice

Jul 19, 2003, 5:59 AM

Post #2 of 2 (1430 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?
Thanks
Tricia
yourkeylady@earthlink.net

 
 


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

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