Achieve — High Level Logic Project. Creating a new meta design pattern.

Friendly in development. Fast in production. Just build your apps. Let Achieve do the rest.

← Back to technical specifications

Achieve RFC 9110 HTTP Redirects

Created November 6, 2026 · Updated November 6, 2026 · Achieve 3.1.0 · Qualified runtime: Node.js 24.22.2

Requirement levels: Redirect status codes have distinct semantics; Location identifies the target URI reference when a redirect is generated.

Achieve automatically generates one redirect class: a directory path missing its trailing slash receives 301 with a Location for the canonical slash form. This preserves relative-resource resolution for the directory's default document.

Applicable requirements

RFC 9110 §15.4.2 defines 301 as a permanent redirect and permits a user agent to use the Location value for future references. The historical method-changing behavior of 301 belongs to user agents; Achieve only generates the response. Application code can author other redirect statuses through the Node response API.

Directory redirect construction

Achieve resolves the path inside the application space before deciding it is a directory. If the request lacks the trailing slash, it appends one, preserves the complete query substring, sets Location, and returns 301. GET includes a short plain-text redirect message; HEAD returns the same status and fields without content.

Examples include /docs to /docs/ and /docs?view=full to /docs/?view=full. The redirect does not expose a filesystem path.

Scope and limits

Achieve does not automatically canonicalize host names, schemes, ports, filename case, or arbitrary application URLs. Exact and subtree route mappings are internal dispatch choices, not redirects. Servlets that create redirects own their status, Location value, content, and application semantics.

Verification

Request-path, static-lookup, HEAD, and access-logging tests verify 301 status, slash insertion, query preservation—including additional question marks—Location, body suppression for HEAD, and complete access records.