From the play docs:
Reverse routing for public assets
As for any controller mapped in the routes file, a reverse controller is created in controllers.routes.Assets
. You use this to reverse the URL needed to fetch a public resource. For example, from a template:
<script src="@routes.Assets.at("javascripts/jquery.js")"></script>
This will produce the following result:
<script src="/assets/javascripts/jquery.js"></script>
Note that we don’t specify the first folder
parameter when we reverse the route. This is because our routes file defines a single mapping for the Assets.at action, where the folder parameter is fixed. So it doesn’t need to be specified explicitly.
However, if you define two mappings for the Assets.at action, like this:
GET /javascripts/*file controllers.Assets.at(path="/public/javascripts", file)
GET /images/*file controllers.Assets.at(path="/public/images", file)
Then you will need to specify both parameters when using the reverse router:
<script src="@routes.Assets.at("/public/javascripts", "jquery.js")"></script>
<image src="@routes.Assets.at("/public/images", "logo.png")">
Any static html in the public/partials directory would be publicly available at /assets/partials/someHtml.html. So strictly speaking, you don't need the /partials/*file route