in reply to Apache/mod_perl woes...
Anyway, the translation gets rather confused when you have URLs that you want handled by your custom handler, but when pieces of the URL exist in the filesystem. I don't know if this is what's happening in your case, but it's certainly possible.
The solution? For me, I've just switched over to using the uri method of the request object:
From that you can determine which file was requested. The other issue is when your handler root isn't the document root. For example, if you configured your Apache like this:my $uri = $r->uri;
Depending on whether "/bar" is part of the filepath you wish to handle, you may need to strip it out, or not. Make sense?<Location /bar> PerlHandler MyHandler </Location>
In short: try using uri instead of path_info. And if you start writing a more complex application, look into using a custom PerlTransHandler to do the URL->filename translation.
|
|---|