Answer the question
In order to leave comments, you need to log in
How to publish react application?
Good day. There was a question about publishing a React application. Have your own server. The problem is that many servers, such as Apache or Express, cannot process the mysite.ru/blablabla path correctly for React. Tell me how you can run the application so that there are no such problems.
Answer the question
In order to leave comments, you need to log in
It is possible on any host for the site.
Move build to your site
In .htaccess write
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
AddDefaultCharset utf-8
Isn't it easier to create a symbolic link to a folder?
For example:
ln -s build/ public_html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question