☁️ Loving our new documentation website? Provide feedback in the CloudCannon Community! ✨

routes[*]

Table of contents

Description:

A single route rule for redirects or rewrites.

Appears in:
└── routes
    └── [*]
Type:
Object
Properties:
forcedboolean#

When true, the redirect will be applied even if a file exists at the from path.

Defaults to: false

fromstring Required#

The URL pattern to match incoming requests against. CloudCannon routing supports glob-style patterns.

statusnumber#

The HTTP status code for this redirect rule. When using 200, 404, and 410 status codes, to must refer to a path on the same Site.

Defaults to: 301

Allowed values: 200 301 302 303 307 308 404 410

When true, captured segments from glob patterns in from will be substituted into the to path.

Defaults to: true

tostring Required#

The destination path or URL for this route. Can be a relative path on the same site or an absolute URL for external redirects.

Examples:
Open in a new tab