perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Foo JH <>
Subject Re: [mp2] a way to map a uri to a physical path
Date Thu, 15 Jan 2009 07:11:08 GMT
Adam Prime wrote:
> Foo JH wrote:
>> Adam Prime wrote:
>>>> I'm trying to find the class/ method which allows me to get the physical
>>>> path base on the uri. Something similar to Server.MapPath('/index.htm')
>>>> in ASP.NET.
>>>> Any advise is appreciated. Thanks.
>>> $r->document_root . $r->uri
>> Thanks for replying. In my case it's a wee bit more complicated (forgot
>> to mention).
>> Thing is, I have alias-ed a path (eg. alias /thisuri c:/wwwroot) in the
>> web server, so $r->uri may not point to the right location.
>> Is there a generic method so that given any uri as a parameter, the
>> library can do the math and return the physical path?
> $r->filename by the looks of things.

I'm not sure if that's the one. From the docs (your ref link):


Get/set the filename on disk corresponding to this response (the result
of the URI --> filename translation).

Sounds like this method assigns a file to the uri instead.

View raw message