Configure .htaccess file for React app located in the subdirectory
Task: configure .htaccess file for React app which located in the subdirectory
Implementation: ( Body of .htaccess file, located in the same subdirectory with React app on the server)
Options -MultiViews
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
# Handle client-side routing
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.html [E=X-HTTP_AUTHORIZATION:%{HTTP:Authorization},QSA,L]
Done.