Commit 10da9f9f authored by Russell Dickenson's avatar Russell Dickenson

Merge branch 'fix-pages-routing-documentation' into 'master'

Fix pages routing documentation

See merge request gitlab-org/gitlab!74522
parents d0dbbf23 fda0d528
...@@ -223,16 +223,13 @@ Consider a Pages site deployed with the following files: ...@@ -223,16 +223,13 @@ Consider a Pages site deployed with the following files:
```plaintext ```plaintext
public/ public/
├─┬ index.html ├── index.html
│ ├ data.html ├── data.html
│ └ info.html ├── info.html
├── data/ ├── data/
│ └── index.html │ └── index.html
├── info/ └── info/
│ └── details.html └── details.html
└── other/
└── index.html
``` ```
Pages supports reaching each of these files through several different URLs. In Pages supports reaching each of these files through several different URLs. In
...@@ -241,23 +238,19 @@ specifies the directory. If the URL references a file that doesn't exist, but ...@@ -241,23 +238,19 @@ specifies the directory. If the URL references a file that doesn't exist, but
adding `.html` to the URL leads to a file that *does* exist, it's served adding `.html` to the URL leads to a file that *does* exist, it's served
instead. Here are some examples of what happens given the above Pages site: instead. Here are some examples of what happens given the above Pages site:
| URL path | HTTP response | File served | | URL path | HTTP response |
| -------------------- | ------------- | ----------- | | -------------------- | ------------- |
| `/` | `200 OK` | `public/index.html` | | `/` | `200 OK`: `public/index.html` |
| `/index.html` | `200 OK` | `public/index.html` | | `/index.html` | `200 OK`: `public/index.html` |
| `/index` | `200 OK` | `public/index.html` | | `/index` | `200 OK`: `public/index.html` |
| `/data` | `200 OK` | `public/data/index.html` | | `/data` | `302 Found`: redirecting to `/data/` |
| `/data/` | `200 OK` | `public/data/index.html` | | `/data/` | `200 OK`: `public/data/index.html` |
| `/data.html` | `200 OK` | `public/data.html` | | `/data.html` | `200 OK`: `public/data.html` |
| `/info` | `200 OK` | `public/info.html` | | `/info` | `302 Found`: redirecting to `/info/` |
| `/info/` | `200 OK` | `public/info.html` | | `/info/` | `404 Not Found` Error Page |
| `/info.html` | `200 OK` | `public/info.html` | | `/info.html` | `200 OK`: `public/info.html` |
| `/info/details` | `200 OK` | `public/info/details.html` | | `/info/details` | `200 OK`: `public/info/details.html` |
| `/info/details.html` | `200 OK` | `public/info/details.html` | | `/info/details.html` | `200 OK`: `public/info/details.html` |
| `/other` | `302 Found` | `public/other/index.html` |
| `/other/` | `200 OK` | `public/other/index.html` |
| `/other/index` | `200 OK` | `public/other/index.html` |
| `/other/index.html` | `200 OK` | `public/other/index.html` |
Note that when `public/data/index.html` exists, it takes priority over the `public/data.html` file Note that when `public/data/index.html` exists, it takes priority over the `public/data.html` file
for both the `/data` and `/data/` URL paths. for both the `/data` and `/data/` URL paths.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment