Hi there,
Can someone help me?
Suppose my React app is hosted at: http://pushstart/myapp
In order the routes works, how does would be my .htaccess file?
TIA
into your .htaccess .
note: ./index.html when your index.html and .htaccess in same folder. if you have put your react app in some other folder then ./someotherfolder/index.html
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi there,
Can someone help me?
Suppose my React app is hosted at: http://pushstart/myapp
In order the routes works, how does would be my .htaccess file?
TIA
RewriteEngine On
RewriteBase /
RewriteRule ^index.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule . /index.html [L]
into your .htaccess .
note: ./index.html when your index.html and .htaccess in same folder. if you have put your react app in some other folder then ./someotherfolder/index.html