NYCPHP Meetup

NYPHP.org

[nycphp-talk] Apache look back functionality and PHP

Michael Sims jellicle at gmail.com
Thu Aug 4 14:30:06 EDT 2005


On Thursday 04 August 2005 12:52, Mark Withington wrote:

> For the life of me, I can't get Apache to look back and find the
> magick.php script, rather it simply looks at image.jpg and assumes
> it's a subdirectory. Has anyone had any experience with this script
> (a PHP front-end to ImageMagick as described at evolt.org) or
> Apache's look back functionality?

Well, I don't know anything about magick.php, but this should work with 
Apache.  These URLS give identical results:

http://www.nyphp.org/ - Apache uses default document
http://www.nyphp.org/index.php - exact URL
http://www.nyphp.org/index.php/foo/bar/baz/ - searches backwards until 
it finds index.php

So, the URL

http://www.example.com/magick.php/image.jpg/foobar/

should search backwards until it finds magick.php and hits it, and 
magick.php would then have the path_info to do something with, such as 
get, mangle, and output your image file.

This Apache directive defaults to on (AFAIK) but perhaps you've turned 
it off:

http://httpd.apache.org/docs/2.0/mod/core.html#acceptpathinfo


Michael Sims



More information about the talk mailing list