Add redirect video

This commit is contained in:
Owen
2026-10-27 10:56:40 -04:00
parent 50a8bd0340
commit e24fd83ae5
+14 -5
View File
@@ -8,12 +8,21 @@ Redirects forward matching HTTP requests to another URL. Use them to retire old
Manage redirects from your organization's **Settings → Redirects**. Manage redirects from your organization's **Settings → Redirects**.
<iframe
className="w-full aspect-video rounded-xl"
src="https://www.youtube.com/embed/s2BU0-9QC0g?si=ssP5f_FNqP_xGJux"
title="YouTube video player"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
referrerpolicy="strict-origin-when-cross-origin"
allowfullscreen
></iframe>
## Attach to a Domain or a Resource ## Attach to a Domain or a Resource
Every redirect attaches to exactly one of: Every redirect attaches to exactly one of:
| Attachment | Listen host | When to use it | | Attachment | Listen host | When to use it |
| --- | --- | --- | | ------------ | ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Domain** | A hostname on one of your [domains](/manage/domains) (subdomain or the base domain) | You need a redirect on a hostname that is not (or not only) a public resource, for example retiring `old.example.com`. Also use this when the hostname matches a resource but you do not want the redirect tied to that resource's lifecycle | | **Domain** | A hostname on one of your [domains](/manage/domains) (subdomain or the base domain) | You need a redirect on a hostname that is not (or not only) a public resource, for example retiring `old.example.com`. Also use this when the hostname matches a resource but you do not want the redirect tied to that resource's lifecycle |
| **Resource** | The attached [public resource](/manage/resources/public/http-https)'s full hostname | You want some paths on an existing resource to redirect while other paths still hit that resource, and you are fine deleting the redirect when the resource is deleted | | **Resource** | The attached [public resource](/manage/resources/public/http-https)'s full hostname | You want some paths on an existing resource to redirect while other paths still hit that resource, and you are fine deleting the redirect when the resource is deleted |
@@ -48,7 +57,7 @@ A request matches a redirect when:
Path match types: Path match types:
| Type | Behavior | | Type | Behavior |
| --- | --- | | ---------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **Exact** | Path must equal the match path | | **Exact** | Path must equal the match path |
| **Prefix** | Path must start with the match path as a path segment (for example `/products` matches `/products/shoes`, not `/productsforsale`) | | **Prefix** | Path must start with the match path as a path segment (for example `/products` matches `/products/shoes`, not `/productsforsale`) |
| **Regex** | Path must match the regular expression | | **Regex** | Path must match the regular expression |
@@ -70,7 +79,7 @@ destination origin + rewritten path + original query string
By default the request path is kept. Optionally set a **path rewrite**: By default the request path is kept. Optionally set a **path rewrite**:
| Rewrite type | Behavior | | Rewrite type | Behavior |
| --- | --- | | ---------------- | ------------------------------------------------------------------------------------- |
| **Exact** | Replace the entire path | | **Exact** | Replace the entire path |
| **Prefix** | Replace the matched prefix and keep the remainder | | **Prefix** | Replace the matched prefix and keep the remainder |
| **Regex** | Replace using the match pattern; substitution supports capture groups (`$1`, `$2`, …) | | **Regex** | Replace using the match pattern; substitution supports capture groups (`$1`, `$2`, …) |
@@ -83,7 +92,7 @@ When the rewrite type is **Regex**, parentheses in the **match path** (with matc
Example: move `/blog/2020/post` to `/archive/post-2020`: Example: move `/blog/2020/post` to `/archive/post-2020`:
| Field | Value | | Field | Value |
| --- | --- | | --------------- | -------------------- |
| Path match type | Regex | | Path match type | Regex |
| Match path | `^/blog/(\d+)/(.*)$` | | Match path | `^/blog/(\d+)/(.*)$` |
| Rewrite type | Regex | | Rewrite type | Regex |
@@ -98,7 +107,7 @@ The original query string is always preserved.
## Permanent vs Temporary ## Permanent vs Temporary
| Setting | Status code | Behavior | | Setting | Status code | Behavior |
| --- | --- | --- | | ------------------- | ----------- | --------------------------------------------------------------- |
| Temporary (default) | **307** | Browsers and clients should not cache the redirect indefinitely | | Temporary (default) | **307** | Browsers and clients should not cache the redirect indefinitely |
| Permanent | **308** | Browsers may cache the redirect; use when the move is lasting | | Permanent | **308** | Browsers may cache the redirect; use when the move is lasting |