Monday, June 1, 2009

urlencode and named parameters

i wrote a simple search in cakephp php, the syntax of the url is:
http://localhost/model/search/Model.field:value/Model2.field2:value2

and it's good, but i noticed that if the value contains / (for example
"va/lue")there are problems, like:
http://localhost/model/search/Model.field:va/ue/Model2.field2:value2

so i thought to urlencode() the value, and then if i search "va/ue"
again the url become:
http://localhost/model/search/Model.field:va%2Fue/Model2.field2:value2

but this gives me 404.. how can i do?

--
pietro

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to cake-php+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

No comments: