I'm in need of putting a static sitemap.xml
file, because Liferay does not generate all of the desired links, and a few that shouldn't be there. I think it's because it's heavily altered by my ext-plugin
.
Question is, that is it possible to set up a static sitemap.xml
(used by google robots) in the portal root, not being changed by Liferay itself?
Using: Liferay 6.0.6
Thanks in advance :)
A solution would be to add your static sitemap to the Liferay Document Library, and then tell Google the sitemap URL using Google's Webmaster Tools.
A second solution would be to add the sitemap to your ROOT directory (if you're using Tomcat), however this may require some changes to Tomcat settings and Liferay code.
Another solution is to create a portlet that generates all the links you want into an XML sitemap, and then save that file to a location of your choose. This is the approach I have taken as I needed to out put full article URLs which don't actually exist as pages.
The best solution was to create a SitemapServlet class in Liferay (as suggested by Johnny) which responses with the sitemap file. No changes in Tomcat were needed.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With