Hi,
I am trying to handle an url that contains an url encoded url. eg. http://site.com/query/action/http%3A%2F%2Fwww.nu.nl
I am using this in the Controller.
protected static $url_handlers = array(
'getShortenedLink/$Link' => 'getShortenedLink',
'getOriginalLink/$Link' => 'getOriginalLink',
);
And this in the Yaml file:
---
Name: myroutes
After: 'framework/routes#coreroutes'
---
Director:
rules:
'query': 'QueryController'
There are two problems with it. When adding a url-encode slash to the url, I get a non-silverstripe 404. When I leave the encoded http:// out of the url, I do not get the last part of the url. ie. When I add www.site.com to the url, I get www.site in te $Link parameter.
Is this a known problem, or am I doing something stupid???