Jump to content


Photo

Virtual Folders/Paths


  • Please log in to reply
4 replies to this topic

#1 fubowl

fubowl
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 29 August 2006 - 11:46 AM

Hi,

I'm sure you've seen this question before and I've found some generic answers via the Search, but none that satisfies my query. I would like to know if anyone can either redirect me to an article or can help me directly with this.

I'd like to be able to have a system with any arbitray amount of sub-folders in the url (http://mysite.com/ab...eam/joe/my-dogs) and have that resolved to a specific entry (joes-dogs) in the DB. But of course I could have (http://mysite.com/ab.../franny/my-dogs) with the same end "folder" but it would have to differentiate because of the preceeding folders.

The only method I'm familiar with is recursion down a tree but I know that to be quite inefficient. I'd just like to be able to process down the URL path and find that exact entry as efficiently as possible without sacrificing too many queries, since it would be happening on every page load.

I'd like any examples or a point in the right direction. I'd really appreciate your help and thank you in advance.

#2 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 29 August 2006 - 11:51 AM

apache mod_rewrite.

Zend Framework uses this in what sounds like the exact way you wish to use it.

#3 fubowl

fubowl
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 29 August 2006 - 12:10 PM

To my understand, using mod_rewrite, which I've seen many times used as an example, you have to layout your variables to be passed to the script. I'm looking for an unlimited number of "folders", thus an unlimited amount of variables would need to be present.

If I am wrong and there's an easy way to do this with unlimited variables, please reply.

#4 Jenk

Jenk
  • Members
  • PipPipPip
  • Advanced Member
  • 778 posts

Posted 29 August 2006 - 12:23 PM

Have a look at how Zend Framework does it.

#5 fubowl

fubowl
  • Members
  • PipPipPip
  • Advanced Member
  • 37 posts

Posted 29 August 2006 - 12:38 PM

Thanks Jenk,

But I'm looking at the Zend Framework manual and I don't see anything regarding this. Could you link me to some materials to what you are speaking of.

I'm really looking for as little a confusing solution as possible. Thus the more help and documentation I could get, the better I could really learn.

Thanks again.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users