Encoding url's the Play! Framework

Is there a way to make the Play! Framework ignore slashes and ? in parts of the URL?

Typically, if I have the following:


It won't work. In that case, what I would want to do is simply have the link in the last part of the URL in a String variable to save it. I suppose I can force the client to replace the / and ? by something else, but I would rather keep it simple.

My first thought was that maybe there is a way to configure the routing such that we have something like:


where data would hold whatever remains of the URL. Can't find out how to do that though.


You can't have : / ? except your main URL. You should encode your parameter to append it to main URL. See URLEncoder for Java.

This is not a valid URL:


It must be:


Then you can pass it to {data} parameter and decode it in your handler method.

Need Your Help

How to use custom directive in a T4 template?

visual-studio-2008 .net-3.5 c#-3.0 t4

I created a custom T4 directive processor in one project, and now I want to use the processor in a T4 template in another project, but I'm receiving the following error: