Skip to content

Commit 3fe69d7

Browse files
authored
Revert "docs: document inline comments in _redirects files (#28171)" (#28503)
This reverts commit 7d32ed3.
1 parent ece9057 commit 3fe69d7

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/content/partials/workers/redirects.mdx

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,8 @@ Only one redirect can be defined per line and must follow this format, otherwise
4545

4646
- Optional parameter
4747

48-
### Comments
49-
5048
Lines starting with a `#` will be treated as comments.
5149

52-
You can also add inline comments to redirect rules. Any `#` token that appears after the `source` and `destination` (and optional `code`) will be treated as the start of a comment and ignored. URL fragments (for example, `/page#section`) are not affected because they do not have a space before the `#`.
53-
54-
```txt
55-
# Full-line comment explaining the next group of redirects
56-
/old-page /new-page 301 # Moved during site redesign
57-
/blog/* /articles/:splat # Blog URL migration
58-
/page /page2#section 301 # URL fragment is preserved
59-
```
60-
6150
### Per file
6251

6352
A `_redirects` file is limited to 2,000 static redirects and 100 dynamic redirects, for a combined total of 2,100 redirects. Each redirect declaration has a 1,000-character limit.
@@ -78,7 +67,7 @@ A complete example with multiple redirects may look like the following:
7867
/trailing /trailing/ 301
7968
/notrailing/ /nottrailing 301
8069
/page/ /page2/#fragment 301
81-
/blog/* https://blog.my.domain/:splat # Blog migration
70+
/blog/* https://blog.my.domain/:splat
8271
/products/:code/:name /products?code=:code&name=:name
8372
```
8473

0 commit comments

Comments
 (0)