Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > calling perl script in apache conf

Reply
Thread Tools

calling perl script in apache conf

 
 
manoj.agarwal.in@gmail.com
Guest
Posts: n/a
 
      02-21-2006
Hi

I want to do some hash on the HTTP_COOKIE string which gives me a value
between 1 to 1000. For this I have written a perl script. Now I want to
call this perl script in my rewrite.conf (rewrite rule file) file in
apache. I am using RewriteMap for this but haven't succeeded. May be I
haven't understood using rewritemap well.
So my question is:

a. Can I reset my HTTP_COOKIE value in the rewrite.conf file?
b. Would calling a perl script be a good idea for this or is there any
other way around?
c. Can I write the logic of hashing within my conf file?


My conf file looks like:

RewriteMap cookie1 prg:/home/y/share/htdocs/cookie1.pl
RewriteRule ^/(index.html)?$ ${bcookie:$1} [L,PT]

Am I doing something wrong in this?

rgds
Manoj

 
Reply With Quote
 
 
 
 
Anno Siegel
Guest
Posts: n/a
 
      02-21-2006
<(E-Mail Removed)> wrote in comp.lang.perl.misc:
> Hi
>
> I want to do some hash on the HTTP_COOKIE string which gives me a value
> between 1 to 1000. For this I have written a perl script. Now I want to
> call this perl script in my rewrite.conf (rewrite rule file) file in
> apache. I am using RewriteMap for this but haven't succeeded. May be I
> haven't understood using rewritemap well.
> So my question is:
>
> a. Can I reset my HTTP_COOKIE value in the rewrite.conf file?
> b. Would calling a perl script be a good idea for this or is there any
> other way around?
> c. Can I write the logic of hashing within my conf file?
>
>
> My conf file looks like:
>
> RewriteMap cookie1 prg:/home/y/share/htdocs/cookie1.pl
> RewriteRule ^/(index.html)?$ ${bcookie:$1} [L,PT]
>
> Am I doing something wrong in this?


Yes, but it has nothing to do with Perl (s/prg/Prg/).

Read the apache documentation of RewriteMap again. If you have
questions, please ask them in an appropriate newsgroup.

Anno
--
If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
C++ calling perl script - Not able to get the stack arguments pushedrom XPUSH in perl script Yogi Perl Misc 1 09-13-2012 11:30 AM
httpd.conf configuration for mod_wsgi.so on wamp (apache)? wojciech777 Python 0 11-05-2011 07:30 PM
what's wrong calling a Perl/CGI script in Perl/CGI script under Tomcat server? kath Perl Misc 4 04-09-2007 09:21 PM
Apache conf file parser Steve Python 0 11-17-2004 09:35 PM
problem calling perl script from SOAP server perl script pj Perl Misc 3 04-09-2004 10:23 PM



Advertisments