calling perl script in apache conf

Discussion in 'Perl Misc' started by manoj.agarwal.in@gmail.com, Feb 21, 2006.

  1. Guest

    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
     
    , Feb 21, 2006
    #1
    1. Advertising

  2. Anno Siegel Guest

    <> 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.
     
    Anno Siegel, Feb 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve

    Apache conf file parser

    Steve, Nov 17, 2004, in forum: Python
    Replies:
    0
    Views:
    372
    Steve
    Nov 17, 2004
  2. wojciech777
    Replies:
    0
    Views:
    515
    wojciech777
    Nov 5, 2011
  3. pj
    Replies:
    3
    Views:
    294
  4. MegaC
    Replies:
    3
    Views:
    504
    Brian Helterline
    May 24, 2004
  5. kath
    Replies:
    4
    Views:
    654
    J. Gleixner
    Apr 9, 2007
Loading...

Share This Page