I am new to CakePHP, and because of this there are some basic things that I used with the Zend Framework that I beat Cake.
I am working on a project where I need to pass a named parameter to a controller / action. Setting the route and passing the parameter is quite simple, my problem is that the parameter is urlencoded url.
For example: http://www.cakephp.com/controller/action/http%3A%2F%2Fwww.google.com , regardless of the controller and setting the actions, it returns 404, but the transmission / controller / action / http: // www .google.com works in some way, the only problem is that it identifies http as a named parameter. In another way, if I execute /controller/action?url=http://www.google.com, it will work.
The work I used for this is to pass the value as a base64 encoded string, but this leads to some limitations. For example, if it is an API, you cannot guarantee that a system using the API can encode a base64 string.
In any case, the best solution would be to pass a url encoded string to the named parameter. The question is why CakePHP does not accept the urlencoded string as a parameter and why does it throw 404?
Thanks to everyone in advance.
source share