AnsweredAssumed Answered

Custom 404 error message if document not found

Question asked by bbiais on May 17, 2016

I want to display a custom error message when file is not found using "View in browser" feature in Alfresco Share.

Example test file:

My document test1.txt doesn't exist so Alfresco return an standard error message with all traces. OK.
However, I don't want my users see this page.
I would like to replace this with a custom page or friendly message.

Following these subjects:

I created a plain text file nammed 404.html.ftl in Data Dictionnary/Web Scripts folder, with custom content:

<p>My custom message.</p>

Refresh the webscript and put the test file URL, I still get the Alfresco standard error message (cf AlfrescoError404_fileNotFound.png)

Rename 404.html.ftl to 404.ftl, refresh the webscript, and I get the browser error message for 404 error, but not my custom message (cf IEError404_fileNotFound.png).

How can I display my custom message?

Thanks for your help.