hi,

I've tried :

RewriteMap  escape-map  prg:/path/to/file/escape.pl
RewriteRule ^(.*)\/index\.html$     /tohtml.pl?path=${escape-map:$1}

when the script is as follow for ex.:

$| = 1;
while(<>) { s/&/_/g;  print $_};

or similar it doesn't work (more precisely if I use <> or <STDIN> ?!?!)
If I use this :

$| = 1;
print "hello";

it works only the first time ?!?!
If I use :

RewriteMap  escape-map  int:toupper
RewriteRule ^(.*)\/index\.html$     /tohtml.pl?path=${escape-map:$1}

it works. But :

RewriteMap  escape-map  int:escape
RewriteRule ^(.*)\/index\.html$     /tohtml.pl?path=${escape-map:$1}

doesn't work ?!!!?
What I'm doing wrong ?
=====
iVAN
[EMAIL PROTECTED]
=====


> >RewriteRule ^(.*)\/index\.html$            /tohtml.pl?path=$1
> >
> >rewriten like this :
> >
> >/tohtml.pl?path=blah&wlah
> >
> >and then in my script the result is that :
> >
> >QueryString("path") is equal to "blah", but not to "blah&wlah".
> >
> >HOW to make escaping in RewriteRule ?
>
> I don't see any way to do this without recourse to an external rewrite engine.
> <http://www.engelschall.com/pw/apache/rewriteguide/#ToC44>.
>
> But, if you are already using mod_perl, you might as well ditch mod_rewrite
> and write your own PerlTransHandler for the URI. See Eagle book p.334,
> <http://www.modperl.com/book/chapters/ch7.html#The_URI_Translation_Phase>,
> better yet, buy the book and show your support.
>

Reply via email to