This repository contains example implementation of the "root context redirect" for IBM MAS Manage. It allows to gracefully handle MAS Manage URLs without or with incorrect context and therefore avoid HTTP404 errors.
When packaged as a part of customization archive and registered in the servers bundle's server.xml
enables automatic /maximo
context redirects when root or any other unknown context has been requested.
- Include
tools/**
in the MAS Manage customization archive. - Register
root-context-redirect
web application in the server bundle's aditional server config (e.g. server.xml).
Example postpreprocessor.sh implementation supports ALL server bundle. It can be easily extended though to support other types of server bundles by copying root-context-redirect.war to other deployment directories e.g. maximo-ui
.
Example root-context-redirect.war implementation redirects users to the /maximo
context. This can be changed by updating root-context-redirect.war/index.html
content.
For the sake of simplicity example root-context-redirect.war implementation hooks up to any kind of error (HTTP4xx, HTTP5xx) and blindly redirects users to the default context. It can be replaced thought by any other fully functional web application which implements more sophisticated error and redirect handling e.g. by preserving parts of the original URL context, query parameters, headers, etc.