Let's see how do it with mod_perl (example from mod_perl documentation):
This is an URL on website -
but you need convert it ashttp://example.com/news/20021031/09/index.html
You can use for that simple mod_perl handler:http://example.com/perl/news.pl?date=20021031&id=09&page=index.html
Also, you should add in http.conf:package MyApache::RewriteURI; use strict; use warnings; use Apache::RequestRec (); use Apache::Const -compile => qw(DECLINED); sub handler { my $r = shift; my($date, $id, $page) = $r->uri =~ m|^/news/(\d+)/(\d+)/(.*)|; $r->uri("/perl/news.pl"); $r->args("date=$date&id=$id&page=$page"); return Apache::DECLINED; } 1;
So, first URL is easier to understand for user than second. Also, based on this you can create something like selector to process and redirect HTTP requests according your rules.PerlTransHandler +MyApache::RewriteURI
---
Schiller
It's only my opinion and it doesn't have pretensions of absoluteness!
In reply to Re: Perl file names and extensions
by nite_man
in thread Perl file names and extensions
by bradcathey
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |