This boilerplate includes a .htaccess
file that does two things:
-
Redirect all traffic to HTTPS because ServiceWorker only works for encrypted traffic.
-
Rewrite all pages (e.g.
yourdomain.com/subpage
) toyourdomain.com/index.html
to letreact-router
take care of presenting the correct page.
Also it includes a .nginx.conf
file that does the same on Nginx server.