Naposledy aktualizováno
19. 5. 2021
Issue
After upgrading our CQ5.3 publish instance to CRX2.1, it is now returning a 200 response for non-existent pages.
Resolution
Case 1: If you don't have a custom 404 handler installed
If you don't have a custom 404 handler (under /apps/sling/servlet/errorhandler/404.jsp
), then please upload and install attached package using CQ5 package manager.
- Go to "publish" instance
http://<host>:<port>/bin/login.html?resource=/etc/packages.list.html
and login as admin - Click on Upload Package
- Upload SlingErrorHandler-1.zip click on OK.
- Click on Install.
- Test by going to a non-existent page.
Case 2: If you have a custom 404 handler installed
If you have custom 404.jsp under /apps/sling/servlet/errorhandler/404.jsp
then please update your code as follows:
... if (!WCMMode.fromRequest(request).equals(WCMMode.DISABLED)) { if (isAnonymousUser(request) && isBrowserRequest(request)) { ... } } response.setStatus(404); ...
Applies to
CQ5.3 with CRX2.1
Stáhnout