On Monday 01 February 2010 15:19:34 m...@normalperson.e4ward.com wrote: > > Keep in mind that /path/12345.mp4 is still a valid URI and hence can be > > requested by the browser. But you can check if the request is the result > > of an internal redirect by checking $r->prev and deny it unless set. > > That's a cool idea. > But how to set it? I never used $r->prev in my before experience. > you don't have to. apache does it for you.
When a request comes in $r->main and $r->prev are false. If it issues a subrequest $subrequest->main keeps $r so that the subrequest can modify the main one. Similar, if the main request is replaced by an internal_redirect() $redirectrequest->prev points to the main request in case you need something from there. Torsten