RedirectRule Schema

A RedirectRule defines a single URL redirection pattern that the redirect plugin uses to redirect incoming requests to new locations. Each rule specifies a source pattern, destination URL, and HTTP status code.

Schema Definition

Schema URL: https://rustybeam.net/schema/RedirectRule

Properties

Property Type Cardinality Description
from https://rustybeam.net/schema/Text 1 The source URL pattern to match. Can be an exact path (e.g., "/old-page.html") or a regex pattern (e.g., "/blog/(.+)")
to https://rustybeam.net/schema/Text 1 The destination URL to redirect to. Can be a relative path (e.g., "/new-page.html"), an absolute URL (e.g., "https://example.com"), or include capture group replacements (e.g., "/articles/$1")
status https://rustybeam.net/schema/Number 1 The HTTP status code to use for the redirect. Common values: 301 (Moved Permanently), 302 (Found), 303 (See Other), 307 (Temporary Redirect), 308 (Permanent Redirect)

Example Usage

<tr itemprop="rule" itemscope itemtype="https://rustybeam.net/schema/RedirectRule">
    <td itemprop="from">/old-page.html</td>
    <td itemprop="to">/new-page.html</td>
    <td itemprop="status">301</td>
</tr>

Status Code Reference