有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!


共 (1) 个答案

  1. # 1 楼答案

    在文档中,http.path设置用于

    The URL path where the application runs on the server: use this if you do not host your Play application at the root of the domain you’re serving it from. This parameter has no effect when deployed as a WAR, because the path will be handled by the application server.

    如果不是这样,那么最好使用routes文件来管理URL,这样就可以同时指定//manage,索引页的操作是对要转发到的操作的简单重定向

    另一个选项是使用HTTP服务器(如Apache或Lighttp)前置Play服务器,并在HTTP服务器配置中执行重定向。这就是http.path的实际用途,它可以帮助播放在现有web服务器环境中共存的应用程序