Jonathan
Jonathan

Reputation: 2063

Pass string, containing a slash as get-param

I'm wondering if it's possible to parse a string containing an URL as GET parameter using Mod-Rewrite through CakePHP. Do I have to pass this via $this->request->data (POST)?

Is it common to set Routes for such cases or would you either recommend splitting the URL into separate parameters?

Upvotes: 0

Views: 777

Answers (2)

mark
mark

Reputation: 21743

A slash in $_GET? Woudn't that just be a query string containing such a slash? See http://book.cakephp.org/2.0/en/controllers/request-response.html#accessing-querystring-parameters

By default those query strings are properly escaped, so all is well without any hacks on your end.

Upvotes: 1

M41DZ3N
M41DZ3N

Reputation: 346

You can use rawurlencode() to esacpe special characters.

Upvotes: 0

Related Questions