>>>>> "Ajay" == Ajay Shah <[EMAIL PROTECTED]> writes:

Ajay> /articles/10/index.html  =>  /articles/index.html?id=10

Ajay> This is what I tried.

Ajay> sub handler {
Ajay>     my $r = shift;
Ajay>     my $uri = $r->uri;

Ajay>     my ($id) = ($uri =~ m|^/articles/(.*?)/|);
Ajay>     my $newuri = $r->document_root . "/articles/index.html";
Ajay>     my $uriobj = $r->parsed_uri;
Ajay>     $uriobj->query("id=$id");
Ajay>     $r->uri($newuri);

Ajay>     return OK;
Ajay> }

I may be wrong, but I bet you have to do this instead:


  $r->uri("/articles/index.html");
  $r->args("id=$id");

By the time the apache-request object has been created, args are
handled in a separate slot.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Reply via email to