You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A URL redirect has a source URL, a target URL, a status code, and some additional parameters that affect its URL matching behavior and runtime behavior.
11
11
@@ -70,13 +70,9 @@ For example, when both **Subpath matching** and **Preserve path suffix** are ena
70
70
71
71
## Status code
72
72
73
-
API field: `status_code` <Typetext="Integer" /> <MetaInfotext="default: 301" />
73
+
API field: `status_code` <Typetext="Integer" /> <MetaInfotext="default: 301" /><br/>
74
+
API values: `301`, `302`, `307`, or `308`.
74
75
75
-
The HTTP status code returned to the client when redirecting.
76
+
The HTTP status code returned to the client when redirecting:
Copy file name to clipboardExpand all lines: src/content/docs/rules/url-forwarding/single-redirects/settings.mdx
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ A wildcard URL redirect has the following configuration parameters:
20
20
21
21
-**Target URL**: Enter the target URL, which can be static (for example, `https://example.com`) or dynamic (for example, `https://example.com/${1}/files/${2}`). Use [wildcard replacement](/ruleset-engine/rules-language/functions/#wildcard_replace) like `${1}`, `${2}`, etc., to define dynamic targets.
22
22
23
-
-**Status code**: The HTTP status code of the redirect response (_301_ by default). Must be one of the following: _301_ (Moved permanently), _302_ (Found, also known as Moved temporarily), _307_ (Temporary redirect), or _308_ (Permanent redirect).
23
+
-**Status code**: The HTTP status code of the redirect response (_301 - Permanent Redirect_ by default). Must be one of the following:
-**Preserve query string**: Whether to preserve the query string when redirecting (disabled by default).
26
28
@@ -32,7 +34,9 @@ A static URL redirect has the following configuration parameters:
32
34
33
35
-**URL**: A literal string that will be used in the `Location` HTTP header returned in the redirect response.
34
36
35
-
-**Status code**: The HTTP status code of the redirect response (_301_ by default). Must be one of the following: _301_ (Moved permanently), _302_ (Found, also known as Moved temporarily), _307_ (Temporary redirect), or _308_ (Permanent redirect).
37
+
-**Status code**: The HTTP status code of the redirect response (_301 - Permanent Redirect_ by default). Must be one of the following:
-**Preserve query string**: Whether to preserve the query string when redirecting (disabled by default).
38
42
@@ -66,7 +70,9 @@ A dynamic URL redirect has the following configuration parameters:
66
70
67
71
-**Expression**: An [expression](/ruleset-engine/rules-language/expressions/) that defines the target URL of the redirect. The result of evaluating this expression will be used in the `Location` HTTP header returned in the redirect response. Refer to the [fields](/ruleset-engine/rules-language/fields/reference/) and [functions](/ruleset-engine/rules-language/functions/) you can use in expressions.
68
72
69
-
-**Status code**: The HTTP status code of the redirect response (_301_ by default). Must be one of the following: _301_ (Moved permanently), _302_ (Found, also known as Moved temporarily), _307_ (Temporary redirect), or _308_ (Permanent redirect).
73
+
-**Status code**: The HTTP status code of the redirect response (_301 - Permanent Redirect_ by default). Must be one of the following:
-**301 - Permanent Redirect**: The page has permanently moved to a new address. For `POST` requests, the client or browser might switch the HTTP method to `GET` when following the redirect.
6
+
-**302 - Temporary Redirect**: The page has temporarily moved to a new address. For `POST` requests, the client or browser might switch the HTTP method to `GET` when following the redirect.
7
+
-**307 - Advanced: Temporary, HTTP method preserved**: The page has temporarily moved to a new address. The client or browser must preserve the original HTTP method (for example, `POST`) when following the redirect.
8
+
-**308 - Advanced: Permanent, HTTP method preserved**: The page has permanently moved to a new address. The client or browser must preserve the original HTTP method (for example, `POST`) when following the redirect.
The optional parameters can have the following values:
7
6
8
-
*`"status_code"` (integer): `301` (Moved permanently), `302` (Found, also known as Moved temporarily), `307` (Temporary redirect), or `308` (Permanent redirect).
9
-
*`"preserve_query_string"` (boolean): `true` or `false`.
7
+
-`"status_code"` (integer):
8
+
-`301` (permanent redirect)
9
+
-`302` (temporary redirect)
10
+
-`307` (temporary redirect, preserving original HTTP method)
11
+
-`308` (permanent redirect, preserving original HTTP method)
12
+
-`"preserve_query_string"` (boolean): `true` or `false`
0 commit comments