Am Montag, 1. Oktober 2007 schrieben Sie:
> You can pass this king of data to mod_rewrite with
> $r->subprocess_env('name' => 'value') on the mod_perl side and RewriteCond
> %{ENV:name} on the mod_rewrite side.
>
> See
> http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html#C_subprocess_en
>v_

Hi, thx for this idea.
Tried it out but still got some problem - mod_rewrite debugging log shows an 
empty input - my env:var is not found/empty.
Are there any restrictions - some "calling" stuff things i should be aware 
off?
Only i guess - the "rewrite" stuff is happening before my filter gets called - 
if this is the cause, can i reorder things?

My var is named: 

RewriteCond %{ENV:ORIGINAL_REQUEST_URI} ^/extern
RewriteRule ^/extern - [R=403,F]

I am setting this variable in a request input filter - maybe a perl access 
handler would be fine here too, as i dont really need the filter object:

$r->subprocess_env("ORIGINAL_REQUEST_URI" => $prev_r->uri());

Where prev_r is a defined Request object of the initial request received.

<Location /extern/>
   PerlInputFilterHandler MyApache2::Redirect::checkAccessHandler
</Location>

Something wrong here?

Or have i have to do such things in a PerlAccessHandler (without the ENV 
stuff) - like i've done it (now), which do the trick:

pseudo code:

get request object
loop through all previos ones $r->prev_r
if prev_r eq forbidden uri == DIRECT_ACCESS
 return FORBIDDEN;
else
 #uri is reached via interal_redirect through outputfilter OK
 return OK;


Torsten

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to