<> 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.
|