From a9fcc6174c58c3e58c0eabacb8600d56131b3a61 Mon Sep 17 00:00:00 2001 From: Ade Viankakrisna Fadlil Date: Thu, 29 Jun 2017 00:35:02 +0700 Subject: [PATCH 1/2] Add more info about apache client side routing After a revelation in https://github.com/facebookincubator/create-react-app/issues/2593#issuecomment-311729534 --- packages/react-scripts/template/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index aa2ab434062..b5211a50012 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1751,7 +1751,7 @@ 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: +If you’re using [Apache HTTP Server](https://httpd.apache.org/), you need to create a `.htaccess` file in the `public` folder that looks like this: ``` Options -MultiViews @@ -1760,7 +1760,9 @@ If you’re using [Apache](https://httpd.apache.org/), you need to create a `.ht RewriteRule ^ index.html [QSA,L] ``` -It will get copied to the `build` folder when you run `npm run build`. +It will get copied to the `build` folder when you run `npm run build`. + +If your `.htaccess` not working or you are using [Apache Tomcat](http://tomcat.apache.org/), you can learn more about it from [this Stack Overflow answer](https://stackoverflow.com/a/41249464/4878474) Now requests to `/todos/42` will be handled correctly both in development and in production. From 5c946a40cb45df2636d1b0b19cdd83eea1c3e901 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Thu, 29 Jun 2017 00:13:31 -0400 Subject: [PATCH 2/2] Update README.md --- packages/react-scripts/template/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index b5211a50012..a4b3d448348 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -1762,7 +1762,7 @@ If you’re using [Apache HTTP Server](https://httpd.apache.org/), you need to c It will get copied to the `build` folder when you run `npm run build`. -If your `.htaccess` not working or you are using [Apache Tomcat](http://tomcat.apache.org/), you can learn more about it from [this Stack Overflow answer](https://stackoverflow.com/a/41249464/4878474) +If you’re using [Apache Tomcat](http://tomcat.apache.org/), you need to follow [this Stack Overflow answer](https://stackoverflow.com/a/41249464/4878474). Now requests to `/todos/42` will be handled correctly both in development and in production.