Skip to content

Commit

Permalink
Add docs for apache's client side routing setting (facebook#1717)
Browse files Browse the repository at this point in the history
* Add docs for apache's client side routing setting

* Tweak advice
  • Loading branch information
viankakrisna authored and gaearon committed Mar 5, 2017
1 parent acf5bae commit ebbb6a4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1250,6 +1250,17 @@ This is because when there is a fresh page load for a `/todos/42`, the server lo
});
```

If you’re using [Apache](https://httpd.apache.org/), you need to create a `.htaccess` file in the `public` folder that looks like this:

```
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [QSA,L]
```

It will get copied to the `build` folder when you run `npm run build`.

Now requests to `/todos/42` will be handled correctly both in development and in production.

### Building for Relative Paths
Expand Down

0 comments on commit ebbb6a4

Please sign in to comment.