I have a completely mod_perl handler-based web app set up as so: <Location ~ ^/myapp> PerlHandler Client::WWW SetHandler perl-script PerlSetVar ConfigFile /home/ajm6q/myapp/data/www-config </Location>
The Client::WWW handler decides what to do based on the path_info of the URI (passing off responsibility in a ChainOfResponsibility pattern): http://www.mysite.com/myapp -> home /myapp/newuser -> new user functionality /myapp/deluser -> delete user functionliaty And so on. What I'm having difficulty grasping is how to best handle image, js, css or other "static" resource requests that fall under the ^/myapp Location ... Client::WWW is currently trying to handle http://mysite.com/myapp/images/dot.gif To further complicate issues, the ConfigFile contains information about where various resources reside (perhaps /home/ajm6q/myapp/data/images for example). These are not under the server's DocumentRoot. I think my options are: 1. Reset the DocumentRoot in each <Location> to point to /home/ajm6q/myapp/data/, and have Client::WWW return DECLINED if the request is for a static resource, so that the request will drop back to Apache ... not sure this would even work, and makes the config file a tad worthless. 2. Install a translation handler that sets the filename of the request appropriately; not sure if this would prevent Client::WWW from handling the request, but would allow a DECLINED drop back to Apache to work without mucking with DocumentRoot ... I think. 3. Have Client::WWW do a subrequest (via lookup_file), and run that directly. 4. ??? TIMTOWTDI is getting me down right about now. Thanks for your advice, -Aaron