View Full Version : url category type variables

08-22-2006, 02:31 PM
Hey guys,

I know i've scene this before but i was wondering how it was done. Say you had a url like..


The "About" and the "Services" are actually url variables, but passed that way instead of...


So in the first example it would be predefined that the first set of slashes holds "variable1" and the second set holds "variable2" and i would be able to reference them anywhere just as i would a normal url variable.

Any advice would be great. I'd really like to figure out how this is done.


08-22-2006, 03:10 PM
Some use Apache's ModRewrite , others note that the server variable $_SERVER['PATH_INFO'] will hold `/About/Services`

so with
$bits will be an array 0=>'',1=>About,2=>Services

These days I use the PATH INFO route but note that it does have several drawbacks, ModRewrite is probably easier assuming your Apache installation has the module available.

08-22-2006, 03:16 PM
great... thank you i'll look into both options.