Forum Moderators: coopster
I would like to know, how to handle the '/' as params in clean urls.
The url pattern is like:
http://localhost/mysite/mycontroller/mymethod/key1/val1/key2/val2 ... key1 = filepath
val1 = uploads/docs/abc.doc So i would like to know how to use param values with '/' so as to preserve the pattern.
Thanks in advance for the valueable suggstions.
.doc part. ^controller/mymethod/([^/]+)/ - gets you key1 (everything after mymethod and up to next /) into $1. (([^.]+)\.([^/]+))/ gets you val1 (everything up to period and the period and everything up to next /) into $2. I might have put too many brackets into the above, maybe this will work for second part:
([^.]+\.[^/]+)/ - one or more characters that are not a period, followed by a period, followed by one or more characters that are not a slash.