Problems with fastcgi php migration
philip.ratzsch at rackspace.com
Sun Mar 9 12:14:56 MSK 2008
If this should be taken off the list (as it contains PHP), I can be emailed directly at philip.ratzsch at rackspace.com . If so, I apologize.
>e.g. /galleries gives the user a main menu...
>/galleries/[num] gives them an event (like a film festival)
>/galleries/[num]/[num] gives them a subevent listing (like a premiere
>photo listing at a film festival)
>and /galleries/[num]/[num]/[num] gives them a specific photo.
Granted it's late, so I may be off the mark, but it sounds to me like something like this may work on the backend:
$a = explode('/',$_SERVER['REQUEST_URI']); // break apart the URI on '/'
array_shift($a); // the first element will be null, so dump it
$i = array_search('gallery',$a); //find where 'gallery' occurs in the array
$inc = $i; // set up for the loop
while( $inc >= $i) // knock off elements until all that's left is the stuff after 'gallery'
If you ran '/gallery/222/33' through this, you should be left with an array containing elements '222' and '33', which you could then use to assemble the path to the file you want to serve. This might be handy as it's immune to variable length URIs like you mentioned.
Is this what you were looking for Ian?
Software Engineer Developer I
Information Systems, Rackspace
Opinions expressed are mine and do not necessarily reflect those of my employer.
Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace.
Any dissemination, distribution or copying of the enclosed material is prohibited.
If you receive this transmission in error, please notify us immediately by e-mail
at abuse at rackspace.com, and delete the original message.
Your cooperation is appreciated.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 3440 bytes
Desc: not available
More information about the nginx