Home > Back-end >  Play framework redirect to another host
Play framework redirect to another host

Time:11-14

I want to write action to redirect to another host (localhost:3003) after some manipulation with data.

I use

Redirect("localhost:3003/localConclusion")

but instead of redirecting i got

http://localhost:9090/localConclusion/localhost:3003/localConclusion

I would like to ask for advice or links which can help me to solve my problem.

I use scala 2.11 & play framework 2.5

CodePudding user response:

Without a complete URL in the redirect, your browser or client will assume it's a relative redirect to the same site.

Just add http://:

Redirect("http://localhost:3003/localConclusion")
  • Related