Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
satya164 committed Jul 28, 2024
1 parent 39d98e4 commit 6e6901e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions versioned_docs/version-7.x/web-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,13 @@ To handle redirects on Vercel, add the following in the `vercel.json` file at th

```json
{
"rewrites": [
{ "source": "/(.*)", "destination": "/index.html" }
]
"rewrites": [{ "source": "/(.*)", "destination": "/index.html" }]
}
```

### GitHub Pages

GitHub pages doesn't support such redirection configuration for SPAs. There are a couple of ways to work around this:
GitHub Pages doesn't support such redirection configuration for SPAs. There are a couple of ways to work around this:

- Rename your `index.html` to `404.html`. This will serve the `404.html` file for all routes. However, this will cause a 404 status code to be returned for all routes. So it's not ideal for SEO.
- Write a script that generates copies the `index.html` file to all routes in the build output. For example, if your app has routes `/`, `/about`, and `/contact`, you can copy the `index.html` file to `about.html` and `contact.html`.
- Write a script that copies the `index.html` file to all routes in the build output. For example, if your app has routes `/`, `/about`, and `/contact`, you can copy the `index.html` file to `about.html` and `contact.html`.

0 comments on commit 6e6901e

Please sign in to comment.