Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting a custom root URL in Play 2.0

I have a play appliaction that works if It is the root of the web host however I want to load it as a sub-url of my host

That is

http://example.com/ <- This works fine and i want to move to it 
http://example.com/AwesomePlayApplication/  <- This want me to rewrite all the routes 

Is there a way to just set a custom root URL that will translate all my configured routes?

like image 335
dkhenry Avatar asked Apr 03 '12 14:04

dkhenry


2 Answers

Add the following configuration key in your conf/application.conf file:

application.context="/AwesomePlayApplication"
like image 173
Julien Richard-Foy Avatar answered Nov 02 '22 03:11

Julien Richard-Foy


As stated by James Roper on google groups : Play 2.0.* does not support running on a different context yet, but Play 2.1 will.

like image 30
jmaffre Avatar answered Nov 02 '22 03:11

jmaffre