Ing. Branislav Gerzo wrote:
Marek Kilimajer [MK], on Tuesday, November 30, 2004 at 15:59 (+0100)
wrote:

MK> Just my idea, not sure if it will work: use urlrewriting to catch all
MK> requests with one script, in that script read the original request, call
MK> it and catch it's output. hope you understand me :)

no, I don't. Which original request ? You are talking about apache ?


User requests /cgi-bin/script.pl

De to the rewrite rule (yes, apache) will execute /cgi-bin/rewrite_emails.pl instead.

In rewrite_emails.pl you wil find out what is the original request, it should be available in some env variable I don't remember. It's /cgi-bin/script.pl in this case

Then you open a connection to the localhost, repeat the request with the same headers, read in the responce and do whatever transformation you need. Or you can do a subrequest, I think it's posible in perl.

This is just an idea. I'm not fluent in perl, I do php. The difficult part is the rewrite rule, you have to be carefull not to make an infinite loop - request from rewrite_emails.pl must not be rewritten again to /cgi-bin/rewrite_emails.pl. You can filter by IP address, subrequest, maybe other options.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to