Virtual Directories

Virtual Directories

am 29.08.2008 22:26:39 von Will Fould

------=_Part_9141_22844657.1220041600316
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello -

This has got to be very common:

I've got a list of directories:

http://www.example.com/foo
http://www.example.com/bar
http://www.example.com/.....

These directories don't exist in the web root but map to the real location
on the file system:

/var/customers/12345
/var/customers/12346
/var/customers/.....

.... (location determined by a database/memcached lookup).

Assuming my code can look in an existing database/memcache with the
requested URI segment, can someone suggest the lightest/fastest ways to
accomplish this or provide a decent link to a better discussion?


Thanks in advance!!

------=_Part_9141_22844657.1220041600316
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hello -

This has got to be very common:

I've got a list of directories:

    

    

     ..

These directories don't exist in the web root but map to the real location on the file system:

     /var/customers/12345

     /var/customers/12346


     /var/customers/.....

... (location determined by a database/memcached lookup).

Assuming my code can look in an existing database/memcache with the requested URI segment, can someone suggest the lightest/fastest ways to accomplish this or provide a decent link to a better discussion?



Thanks in advance!!


------=_Part_9141_22844657.1220041600316--

Re: Virtual Directories

am 29.08.2008 23:51:13 von Perrin Harkins

On Fri, Aug 29, 2008 at 4:26 PM, Will Fould wrote:
> Assuming my code can look in an existing database/memcache with the
> requested URI segment, can someone suggest the lightest/fastest ways to
> accomplish this or provide a decent link to a better discussion?

Some options:
- mod_rewrite
- PerlTransHandler
- PerlResponseHandler that sends the actual file

If you can use mod_rewrite, that's the lightest option.

- Perrin