Mod_Rewrite / Regex to PHP URL
- From: "Dr. No" <no@xxxxx>
- Date: Wed, 14 Feb 2007 23:15:34 GMT
I am new to using mod_rewrite and am trying to rewrite a URL to pass values to my script so that:
http://www.myclient.com/everything/animals/mammals/cats
is transformed into
http://www.myclient.com/index.php?nav[0]=everything&nav[1]=animals&nav[2]=mammals@nav[3]=cats
Specifically, I am looking for an n-ary solution to this problem. I know how to do it for a discrete number, but how do I do this transformation when the number of variables to go into the nav array is unknown, and how do I generate the index number? Can any experience mod_rewrite gurus point me in the right direction. I'm sure this is a common design pattern.
Thanks.
.
- Follow-Ups:
- Re: Mod_Rewrite / Regex to PHP URL
- From: Kimmo Laine
- Re: Mod_Rewrite / Regex to PHP URL
- From: Rik
- Re: Mod_Rewrite / Regex to PHP URL
- Prev by Date: php/mysql syntax help
- Next by Date: Re: global variables
- Previous by thread: php/mysql syntax help
- Next by thread: Re: Mod_Rewrite / Regex to PHP URL
- Index(es):
Relevant Pages
|