在Play 2.0中设置自定义根URL [英] Setting a custom root URL in Play 2.0
本文介绍了在Play 2.0中设置自定义根URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果它是Web主机的根目录,那么我有一个播放应用程序可以正常工作,但是我想将其作为主机的子URL加载
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
那是
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
有没有一种方法可以设置一个自定义的根URL,该URL将转换我所有已配置的路由?
Is there a way to just set a custom root URL that will translate all my configured routes?
推荐答案
在您的conf/application.conf
文件中添加以下配置密钥:
Add the following configuration key in your conf/application.conf
file:
application.context="/AwesomePlayApplication"
这篇关于在Play 2.0中设置自定义根URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文