Skip to content

Commit ba3beb8

Browse files
committed
Adding syntax to codeblocks
1 parent 176bc27 commit ba3beb8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/how-to/websites-on-ipfs/redirects-file-support.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Each line contained within the `_redirects` file has 3 basic components:
3333

3434
For example, if you want to temporarily redirect traffic from your home page to your index page, the `_redirects` file should contain a line that looks something like this:
3535

36-
```
36+
```plaintext
3737
/home /index.html 302 \n
3838
```
3939

@@ -45,29 +45,29 @@ The same format is used for all redirects.
4545

4646
The `200` status will be treated as a rewrite, returning OK without changing the URL shown in the browser. This staus code can be used to build [Progressive Web Apps](https://en.wikipedia.org/wiki/Progressive_web_app) and [Single Page Applications](https://en.wikipedia.org/wiki/Single-page_application).
4747

48-
```
48+
```plaintext
4949
/home /index.html 200 \n
5050
```
5151

5252
### Redirect an old URL to a new place
5353

5454
The `301` status is a permanent redirect, this is the default status code used when no others are spcified.
5555

56-
```
56+
```plaintext
5757
/index /docs.html 301 \n
5858
```
5959

6060
The `302` status is commonly used for temporary redirects.
6161

62-
```
62+
```plaintext
6363
/home /under-construction.html 302 \n
6464
```
6565

6666
### Add a custom 404 page to your website
6767

6868
Use the `_redirects` file support to add a custom 404 page to your website.
6969

70-
```
70+
```plaintext
7171
/home /custom-404.html 404 \n
7272
```
7373

@@ -79,7 +79,7 @@ This is useful for redirecting users to their desired content, even if their sea
7979

8080
For example, if I wanted to search for an article titled "hello world" that was written on June 15, 2022, I could search for it like this: `/posts/06/15/2022/hello-world` and be redirected to `/articles/2022/06/15/hello-world`
8181

82-
```
82+
```plaintext
8383
/posts/<month>/<day>/<year>/<slug> /articles/<year>/<month>/<day>/<slug> \n
8484
```
8585

0 commit comments

Comments
 (0)