Commit 5965dc40 authored by Brian Runnells's avatar Brian Runnells Committed by GitHub

Merge pull request #46 from fortybillion/patch-1

Docs: clarify route ordering when serving single page apps
parents f13104eb b66b5450
...@@ -68,6 +68,18 @@ You can define custom routes that combine to a single file. This allows you to p ...@@ -68,6 +68,18 @@ You can define custom routes that combine to a single file. This allows you to p
} }
``` ```
##### Browser history and asset files
When serving a single page app, it's useful to support wildcard URLs that serves the index.html file, while also continuing to serve JS and CSS files correctly. Route ordering allows you to do both:
```json
{
"routes": {
"/assets/*": "/assets/",
"/**": "index.html"
}
}
```
#### Custom Redirects #### Custom Redirects
With custom redirects, you can move pages to new routes but still preserve the old routes for SEO purposes. By default, we return a `301` status code, but you can specify the status code you want. With custom redirects, you can move pages to new routes but still preserve the old routes for SEO purposes. By default, we return a `301` status code, but you can specify the status code you want.
......
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