Skip to content

Commit 45cdeef

Browse files
authored
Update redirect-all-different-domain-root.mdx
Retaining the example URLs from the original Bulk Redirect instructions, replace Bulk Redirect with an easier-to-use Wildcard Redirect Rule.
1 parent 2d3dd92 commit 45cdeef

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

src/content/docs/rules/url-forwarding/examples/redirect-all-different-domain-root.mdx

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,27 @@ description: Create a redirect rule to redirect all URLs for a domain to point
1111

1212
In this example, an old website was discontinued and replaced by a new one in a different domain. The functionality is different, and all URLs should now point to the root of the new domain. The same applies to any subdomains of the old domain.
1313

14-
1. Create a Bulk Redirect List with the following URL redirect:
14+
<Example>
1515

16-
- **Source URL**: `example.com/`
17-
- **Target URL**: `https://example.net/`
18-
- **Subpath matching**: Enabled
19-
- **Include subdomains**: Enabled
20-
- **Preserve path suffix**: Disabled
16+
**When incoming requests match**
2117

22-
2. Create a Bulk Redirect Rule that enables this list.
18+
- **Wildcard pattern**
19+
- **Request URL**: `http*://*example.com/*`
2320

24-
This configuration will perform the following redirects:
21+
**Then**
2522

26-
| Request URL | URL after redirect |
27-
| ----------------------------------------- | ---------------------- |
28-
| `http://example.com/` | `https://example.net/` |
29-
| `https://example.com/` | `https://example.net/` |
30-
| `https://subdomain.example.com/` | `https://example.net/` |
31-
| `https://example.com/my/path/to/page.htm` | `https://example.net/` |
32-
| `https://example.com/search?q=term` | `https://example.net/` |
23+
- **Target URL**: `https://example.net/`
24+
- **Status code:** _301_
25+
- **Preserve query string:** Disabled
26+
27+
</Example>
28+
29+
For example, the redirect rule would perform the following redirects:
30+
31+
| Request URL | Target URL | Status code |
32+
| ----------------------------------------- | ---------------------- | ----------- |
33+
| `http://example.com/` | `https://example.net/` | `301` |
34+
| `https://example.com/` | `https://example.net/` | `301` |
35+
| `https://subdomain.example.com/` | `https://example.net/` | `301` |
36+
| `https://example.com/my/path/to/page.htm` | `https://example.net/` | `301` |
37+
| `https://example.com/search?q=term` | `https://example.net/` | `301` |

0 commit comments

Comments
 (0)