
bshah
New User
Jun 17, 2003, 3:47 PM
Post #1 of 2
(2255 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
|