I got a blank page even after configuring .htaccess file in build of react app on plesk server

Viewed 160

It seems everything is good after hosting the build of my react app on my plesk server. I'm using React-router and it works fine while I'm clicking on links, but when I refresh my webpage it returns an apache 404 error.

After adding the following

<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>

in my .htaccess file placed on the root of my hosting folder, a got a blank page.

Can anyone please help me ? Am am using "react": "17.0.1" and "react-router-dom": "5.2.0",, Plesk server version : Plesk Obsidian 18.0.31 Update #3

0 Answers
Related