Playframework 2.0 在Play 2.0中设置自定义根URL
我有一个play应用程序,如果它是web主机的根目录,它就可以工作,但是我想将它作为主机的子url加载 就是Playframework 2.0 在Play 2.0中设置自定义根URL,playframework-2.0,Playframework 2.0,我有一个play应用程序,如果它是web主机的根目录,它就可以工作,但是我想将它作为主机的子url加载 就是 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 http://example.com/ 在conf/applicatio
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
http://example.com/ 在conf/application.conf
文件中添加以下配置键:
application.context="/AwesomePlayApplication"
正如James Roper在上所述:Play 2.0.
还不支持在不同的上下文上运行,但是Play 2.1将运行。在Play 2.5.x中,现在是Play.http.context=“/AwesomePlayApplication”,当我尝试将其放入conf/application.conf时,它不起作用。我必须用-Dplay.http.context=“/AwesomePlayApplication”启动服务器