Hello all,
I've run into a very peculiar bug in a cgi script I'm working on. I'm
trying to use HTML::Template to add the query string that will be passed
along to another cgi script, and while this works fine by itself, it is
not seen by mod_rewrite. Let me try to explain.
The user signs in to use the script. The username is stored as a
variable. My template file has links such as
<a href="nodes/<TMPL_VAR NAME="nodeid">.cgi?current_user=<TMPL_VAR
NAME="currentuser">>Go to this node</a>.
I have noticed that mod_rewrite will recognize the variable "nodeid" in
this example, but it will not recognize anything to the right of the
.cgi (I've also tried .html, etc.). If I write a simple test rewrite
such as:
RewriteRule ^nodes/([0-9]+)\.cgi\?(.+) cf.cgi?nodeid=$1¤t_user=$2
and catch the variables in my cgi script (using CGI::Carp), I get the
correct number back for the nodeid ($1), but nothing back for the
currentuser ($2), even though the source code for the page shows that I
have a link with something like nodes/89.cgi?current_user=foo.
Doing the same thing without mod_rewrite (that is, using HTML::Template
to fill in my cgi variables to be passed around) works fine.
Thanks in advance,
Adam
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>