-
Notifications
You must be signed in to change notification settings - Fork 56
Deployments
Jesus H edited this page Sep 10, 2019
·
1 revision
When deploying static files to an Apache server from a react build app, make sure you add the following .htaccess file to your server.
#Apache Server - Static files configuration
#.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
</IfModule>
Ref: (Apache Config for React Router)[https://gist.github.com/alexsasharegan/173878f9d67055bfef63449fa7136042]