Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Playframework: routes entry to an external URL

I want the following redirection functionality

GET /google    google.com

How should I implement this?

like image 315
roshan Avatar asked Aug 26 '11 02:08

roshan


1 Answers

It does not seem it is possible to do that straight from the routes files at this moment.

You could implement this in a controller:

public class Application extends Controller {

 public static void google() {
    redirect("http://www.google.com");
 }
}
like image 72
Nicolas Modrzyk Avatar answered Sep 22 '22 21:09

Nicolas Modrzyk