留言板

Creating a custom 404 error page

Rob Hall,修改在9 年前。

Creating a custom 404 error page

Junior Member 帖子: 47 加入日期: 11-11-30 最近的帖子
I've set up in a hook war file a simple custom 404.jsp file and set this in my portal-ext.properties (I found these settings in other threads):

# 404 page
layout.show.http.status=true
layout.friendly.url.page.not.found=/errors/404.jsp

Restarted Liferay, deployed the war file. If I try and go to a page that doesn't exist on my site, instead of the 404 page I get a nonsense message--
'This webpage is not available' and the detail error message is Error code: ERR_CONTENT_DECODING_FAILED. Tried in both Chrome and Firefox.

Any thoughts on the source of this? Is there some configuration missing?
thumbnail
Manali Lalaji,修改在9 年前。

RE: Creating a custom 404 error page (答复)

Expert 帖子: 362 加入日期: 10-3-9 最近的帖子
Hi Rob,

Can you try to disable your GZipFilter from web.xml?
Try putting in portal-ext.properties:
com.liferay.portal.servlet.filters.gzip.GZipFilter=false

HTH!
Rob Hall,修改在9 年前。

RE: Creating a custom 404 error page

Junior Member 帖子: 47 加入日期: 11-11-30 最近的帖子
Thanks..that worked.