I'm trying to set up an SEO friendly route on Play! Framework, which has several parameters (the second parameter is optional). I aim at:
http://domain.com/article/jsmith/name-of-article
But the game is generated:
http://domain.com/article/jsmith?articleSlug=name-of-article
In my opinion:
@{Article.show("jsmith","name-of-article")}
My controller
public static void show(String username,String articleSlug){
...
}
My route file
GET / article / {username} Article.show
GET / article / {username} / {articleSlug} Article.show
source
share