掲示板

Create 404 page for each website on same server.

thumbnail
9年前 に Rahul Saraswat によって更新されました。

Create 404 page for each website on same server.

Junior Member 投稿: 62 参加年月日: 13/02/26 最新の投稿
Hi Everyone,

I have various websites running on a liferay portal. I need to create a different 404 error page for each website. I saw various posts but I came accross two approachs :

1) Either we can create a jsp page(named 404.jsp in error folder in webapp) in the theme project and we add below line in web.xml :
<error-page>
<error-code>404</error-code>
<location>/errors/404.jsp</location>
</error-page>

I tried this but whenever I enter wrong url for a page and it throws 404 error it does not display my jsp page.

2) We can create a hook and make the changes but in this case I doubt we will be able to design different error pages for each website.

Can anyone please suggest. Will appreciate any help.

Thanks
Rahul Saraswat
thumbnail
9年前 に Harish Kumar によって更新されました。

RE: Create 404 page for each website on same server.

Expert 投稿: 483 参加年月日: 10/07/31 最新の投稿
Have a look at layout.friendly.url.page.not.found=/html/portal/404.html in portal.properties file

you can provide the jsp file instead of html page and implement the logic to render site specific error page
thumbnail
9年前 に Rahul Saraswat によって更新されました。

RE: Create 404 page for each website on same server.

Junior Member 投稿: 62 参加年月日: 13/02/26 最新の投稿
Harish Kumar:
Have a look at layout.friendly.url.page.not.found=/html/portal/404.html in portal.properties file

you can provide the jsp file instead of html page and implement the logic to render site specific error page


Thanks Harish Kumar for the quick reply.

Can you please help me out with an example or a link to follow.
thumbnail
8年前 に Nikhil Nishchal によって更新されました。

RE: Create 404 page for each website on same server.

Regular Member 投稿: 176 参加年月日: 12/06/22 最新の投稿