I want to redirect to website "www.xxx.com" when access to localhost:9000.
environment is scala and play-framework.
routes file setting is below
GET / controllers.HomeController.index
controllers
package controllers
import javax.inject.Inject
import play.api.mvc._
/**
* A very small controller that renders a home page.
*/
class HomeController @Inject()(cc: ControllerComponents) extends AbstractController(cc) {
def index = Action { implicit request =>
Ok(views.html index())
}
}
This is the screenshot: localhost:9000. localhost:9000 image
How to redirect to "www.xxx.com" when access to localhost:9000? please advice me.