Question

Just for a quick question. Where does the sitemap.xml to place in play framework 2.1 project? do we need to configure the route file to the sitemap.xml?

Appreciate your help

thanks, Best rgsd, a1ucard

Was it helpful?

Solution

Either an Action generates dynamically your sitemap.xml, then you have to configure the URL like this:

GET   /sitemap.xml    controllers.Application.sitemapGenerator

Either you generate your sitemap.xml by hand, then put it in the public folder of your Play app, and then add an Asset route:

GET   /sitemap.xml    controllers.Assets.at(path="/public", file = "sitemap.xml")
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top