Re: mod_perl + mod_rewrite

2002-12-06 Thread Stas Bekman
P. Zadikian wrote:

Hello,
Is there some way to set mod_rewrite rules in a  section in the 
apache configuration?

Just like any other httpd configuration, as explained here:
http://perl.apache.org/docs/1.0/guide/config.html#Apache_Configuration_in_Perl
and in much more detail in the eagle and the cookbook.

You can even write your own PerlTransHandler which will do the rewrite...

__
Stas BekmanJAm_pH --> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com




Re: mod_perl, mod_rewrite, package namespace

2000-06-04 Thread Ime Smits

Hi,

I just wanted to let you know that (once again) re-RTFM the manual *twice*
solved my muliple compilation problem. The solution is adding [PT] to the
RewriteRule.

RewriteRule ^/query/(.*) /query.pl?$1 [PT]

--
http://www.apache.org/docs/mod/mod_rewrite.html:

'passthrough|PT' (pass through to next handler)
This flag forces the rewriting engine to set the uri field of the internal
request_rec structure to the value of the filename field. This flag is just
a hack to be able to post-process the output of RewriteRule directives by
Alias, ScriptAlias, Redirect, etc. directives from other URI-to-filename
translators. A trivial example to show the semantics: If you want to rewrite
/abc to /def via the rewriting engine of mod_rewrite and then /def to /ghi
with mod_alias:
RewriteRule ^/abc(.*)  /def$1 [PT]
Alias   /def   /ghi

If you omit the PT flag then mod_rewrite will do its job fine, i.e., it
rewrites uri=/abc/... to filename=/def/... as a full API-compliant
URI-to-filename translator should do. Then mod_alias comes and tries to do a
URI-to-filename transition which will not work.
Note: You have to use this flag if you want to intermix directives of
different modules which contain URL-to-filename translators. The typical
example is the use of mod_alias and mod_rewrite..