NCIOCPL / cgov-digital-platform-dynamic-services

Legacy CDE Services
1 stars 2 forks source link

Story: Use Akamai for 404 Responses. #5

Open bryanpizzillo opened 4 years ago

bryanpizzillo commented 4 years ago

As a [role], I want [feature], so that [benefit]

We will no longer update content on the old site, our 404 has page content. So we need the service to return a 404 code, but not care about any markup. Akamai will see the 404 and serve up the appropriate page of content. INSERT DIGITAL PLATFORM STORY HERE

First, do we actually have 404s on the legacy content. If we do configure, Akamai to get the 404 from Drupal or something.

This is to support whatever weirdness around: <add name="PageNotFoundHandler" verb="GET" path="PageNotFound.aspx" type="NCI.Web.CDE.HttpHandlers.PageNotFoundHandler,NCILibrary.Web.ContentDeliveryEngine" />

ESTIMATE 4-5 days. Some investigation has been done as part of a digital platform 404 fix.

Acceptance Criteria

Scenario: [title]
  Given [context]
    And [some more context]
  When  [event]
  Then  [outcome]
    And [another outcome]

Resources:

Notes

Some complementary notes if necessary:


Solution

Prerequisites

Tasks

Technical Notes

blairlearn commented 4 years ago

Possible approach:

Instead of potentially hitting the Acquia servers on every 404 error, we set up a static 404 page in NetStorage (with nightly updates) and serve that page anytime the legacy services report a 404 error. (Potentially, this could be expanded to put themed 404 pages on any static file type which presently results in an "ugly" error. e.g. https://www.cancer.gov/chicken.jpg)

Create a new "Static Asset" NetStorage location.

Create a new Akamai rule based on the "Forward to Alternate Host" template.

This rule would be a descendant of the one which routes traffic to the "legacy services" origin.

Generate and maintain a themed 404 Page