Skip to content

Commit 1b27b02

Browse files
authored
docs(pgs): Redirects have to start with /, http, or https (#7)
1 parent 77734fd commit 1b27b02

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

posts/pgs.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ We have a very easy-to-setup guide on [custom domains](/custom-domains#pgssh).
179179

180180
We support custom redirects and rewrites via a special file `_redirects`.
181181

182-
> The `_redirects` filesize cannot exceed 5kb.
182+
> The `_redirects` file size cannot exceed 5KB.
183183
184184
```
185185
# Redirect browser request to what we serve
@@ -220,15 +220,17 @@ override this preference by adding a force flag to your redirect entry:
220220
/space / 301!
221221
```
222222

223-
## Redirect `www` to naked domain
223+
## Redirect `www` to apex domain
224224

225-
Our recommended solution is to create a separate project with just a
225+
A common requirement is to redirect "www.example.com" to the apex domain "example.com" or the other way around.
226+
227+
To accomplish this, we recommend you create a separate project with just a
226228
`_redirects` file inside of it.
227229

228-
1. Create a `_redirects` file with a `301` to naked domain:
230+
1. Create a `_redirects` file with a `301` to the apex domain:
229231

230232
```bash
231-
echo "/* naked-domain.com/:splat 301" >> _www_redirects
233+
echo "/* https://example.com/:splat 301" >> _www_redirects
232234
rsync "$PWD/_www_redirects" pgs.sh:/www-proj/_redirects
233235
```
234236

@@ -287,7 +289,7 @@ will let you use `/api/` from your JavaScript client:
287289

288290
We support custom headers via a special file `_headers`.
289291

290-
> The `_headers` filesize cannot exceed 5kb.
292+
> The `_headers` file size cannot exceed 5KB.
291293
292294
```
293295
# a path:

0 commit comments

Comments
 (0)