NYCPHP Meetup

NYPHP.org

[nycphp-talk] Server Path for HTML IMG SRC?

inforequest 1j0lkq002 at sneakemail.com
Tue Mar 29 18:46:40 EST 2005


Yeah, I was waiting to see if that got suggested, or a more generic handler.

Actually I think Apache could handle it with a Files container, perhaps inside a directory if needed to protect the rest of the site.  <Files flename> SetHandler GoodFile </Files> and that can go into htaccess as well.

Working out the details is a-trivial for me because my brain starting hurting on this specific example:

? are all images in /events/images or are some in /otherevent/images
? why name a script file.php... and why copy it to multiple locations.... <Files File>SetHandler File </Files> it is soo confusing :-D       Go ahead and try it and accidentally set yourself into a recursive loop.... like I did. Bleh.

This is an example of how a site designed around the filesystem can start to get in its own way, although this specific example is especially "difficult"  



-=john andrews






-----Original Message-----
From: 
	"Andrew Yochum andrew-at-plexpod.com |nyphp dev/internal group use|" <...>
Sent: Mar 29, 2005 2:34 PM
To: NYPHP Talk <talk at lists.nyphp.org>
Subject: Re: [nycphp-talk] Server Path for HTML IMG SRC?

On Tue, Mar 29, 2005 at 04:13:48PM -0500, Mitch Pirtle wrote:
> On Tue, 29 Mar 2005 13:26:50 -0500, Daniel Convissor
> <danielc at analysisandsolutions.com> wrote:
> > 
> > You could use symbolic links on the file system.
> > 
> > Or make file.php smarter.  Use a variable for the path in the img src's
> > and have the variable determined according to where the calling file is.
> 
> Or just whip out some regexp-fu with mod_rewrite.

Or a smart 404 script?

Andrew
_______________________________________________
New York PHP Talk Mailing List
AMP Technology
Supporting Apache, MySQL and PHP
http://lists.nyphp.org/mailman/listinfo/talk
http://www.nyphp.org




More information about the talk mailing list