Commit 163b76b8 authored by john doe's avatar john doe Committed by Russell Dickenson

Add note about GitLab Pages and redirects

Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/342781
parent 4c3e65b0
...@@ -163,6 +163,12 @@ Splats also match empty strings, so the previous rule redirects ...@@ -163,6 +163,12 @@ Splats also match empty strings, so the previous rule redirects
### Rewrite all requests to a root `index.html` ### Rewrite all requests to a root `index.html`
NOTE:
If you are using [GitLab Pages integration with Let’s Encrypt](custom_domains_ssl_tls_certification/lets_encrypt_integration.md),
you must enable it before adding this rule. Otherwise, the redirection breaks the Let's Encrypt
integration. For more details, see
[GitLab Pages issue 649](https://gitlab.com/gitlab-org/gitlab-pages/-/issues/649).
Single page applications (SPAs) often perform their own routing using Single page applications (SPAs) often perform their own routing using
client-side routes. For these applications, it's important that _all_ requests client-side routes. For these applications, it's important that _all_ requests
are rewritten to the root `index.html` so that the routing logic can be handled are rewritten to the root `index.html` so that the routing logic can be handled
...@@ -180,7 +186,7 @@ rule like: ...@@ -180,7 +186,7 @@ rule like:
Use placeholders in rules to match portions of the requested URL and use these Use placeholders in rules to match portions of the requested URL and use these
matches when rewriting or redirecting to a new URL. matches when rewriting or redirecting to a new URL.
A placehold is formatted as a `:` character followed by a string of letters A placeholder is formatted as a `:` character followed by a string of letters
(`[a-zA-Z]+`) in both the `from` and `to` paths: (`[a-zA-Z]+`) in both the `from` and `to` paths:
```plaintext ```plaintext
......
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