2

I want to set a custom 410 page on liferay. I have already configured that for a 404 page via the file portal-ext.properties

layout.friendly.url.page.not.found=/html/portal/404.html

But I don’t know how to do it for a 410 page. Thanks for helping

1 Answers1

3

There is no such configuration option. If you look at the code of PortalImpl.sendError you will see, that there is a special test for NoSuchLayoutException. All other errors are just redirected to the status page.

You could either create an EXT plugin and overwrite PortalImpl.sendError to do whatever you want. Or you create a hook and overwrite /html/portal/status.jsp.

Tobias Liefke
  • 8,637
  • 2
  • 41
  • 58
  • To add on to Tobias's answer,currently the given list(403,404,400,500) is being handled in PortalImpl.java.It is more advisable to go for overrding status.jsp using hook,to have a cleaner solution. – Shivam Aggarwal Nov 11 '16 at 06:34