You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Matthew Young <my...@gmail.com> on 2009/09/16 07:42:01 UTC
[users@httpd] How to manipulate the query string and headers in apache1
Hello,
What is the best way to set a cookie based on a value from a var extracted
from the query string? All of this done on Apache1 and on a webserver level?
The following is my suggestions and questions:
a.) mod_rerite cannot set cookies in apache1, so one would think that using
that module to extract the variable form the query string and then applying
it to mod_headers would solve this issue, but after brainstorming this idea
I find that passing the var from mod_rewrite to mod_headers is not possible.
Is this correct?
b.) Apache is not a programming language so one could use mod_perl, or
mod_python to do the regex (similar to mod_rewrite) for capturing the needed
var, and then set the cookie. This via the "hook" ups like
PerlResponseHandler or a PerlRequestHandler or some other Perl*Handler to
execute the script on every request cycle within the daemon.
Would this be the best practice to do what I want to do?
Thanks all.
-Matt