Re: rewrite url in modperl

Torsten Förtsch <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
On Monday 01 February 2010 15:03:53 [email protected] wrote:
> 2010/2/1 Torsten Förtsch <[email protected]>:
> > If you don't want the browser to see the actual location of the mp4 file
> > then you need $r->internal_redirect:
> >
> > use Apache2::SubRequest ();
> > ...
> >    if ( is_valid_ip($ip) ){
> >        $r->internal_redirect('/path/12345.mp4');
> >        return Apache2::Const::OK;
> 
> Thank you Torsten, that's really what I expected.
> 
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.

Torsten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.