rewrite and CGI-PERL

2007-12-25 1:29:00

Hi Gurus,

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} ^/xxx/.*\.htm.* [OR]

RewriteCond %{REQUEST_URI} ^/xxx/setup.exe

RewriteRule ^/(.*) http://WebLogic:7001/admin/serveLogin [P]

What this rewrite does is anyone who types URL http://mydomain.com/xxx or
http://mydoamin.com/xxx/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 xxx 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.

Please Help.

Any suggestions will be of great help.

Thanks in advance

BS

Comments

Got something to say?

You must be logged in to post a comment.