React главная странице индексируется как 404

Всем привет!

Помогите пожалуйста разобраться в чём проблема, сделал многостраничный сайт, использовал React + react-router-dom + React Helmet, подключил пререндеринг prerender.io и все страницы индексируются нормально, кроме главной, хотя если перейти по ней, то она открывается и всё также работает правильно.

Router:

ReactDOM.render(
  <Router>
    <ScrollToTop></ScrollToTop>
    <Routes>
      <Route path="/" element={<Home />} />
      <Route path="/children-dental" element={<ChildDental />} />
      <Route path="/prices" element={<PricesPage />} />
      <Route path="/privacy" element={<Privacy />} />
      <Route path="/reviews" element={<ReviewsPage />} />
      <Route path="/works" element={<WorksPage />} />
      <Route path="/doctors" element={<DoctorsPage />} />
      <Route path="/clinics" element={<ClinicsPage />} />
      <Route path="/contacts" element={<ContactsPage />} />
      <Route path="/services/whitening" element={<Whitening />} />
      <Route path="/services/hygiene" element={<Hygiene />} />
      <Route path="/services/bite-correction" element={<BiteCorrection />} />
      <Route path="/services/teeth-healing" element={<TeethHealing />} />
      <Route path="/services/prosthetics" element={<ProstheticsPage />} />
      <Route path="/services/vinirs" element={<VinirsPage />} />
      <Route path="/services/surgery" element={<Surgery />} />
      <Route path="/services/diagnostic" element={<DiagnosticPage />} />
      <Route
        path="/services/child-bite-correction"
        element={<ChildBiteCorrection />}
      />
      <Route path="/services/child-diagnostic" element={<ChildDiagnostic />} />
      <Route path="/services/child-surgery" element={<ChildSurgery />} />
      <Route path="/services/child-teeth" element={<ChildTeeth />} />
      <Route path="/services/child-hygiene" element={<ChildHygiene />} />
      <Route path="/services/child-sleep" element={<ChildSleep />} />
      <Route path="/error" element={<Error />} />
      <Route path="*" element={<Error />} />
    </Routes>
  </Router>,
  document.getElementById("root")
);

.htaccess:

<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteBase /
  Redirect 301 /paradontologiya https://dental-home.ru/services/diagnostic
  Redirect 301 /uslugi https://dental-home.ru/#services
  Redirect 301 /diagnostika https://dental-home.ru/services/diagnostic
  Redirect 301 /protezirovanie https://dental-home.ru/services/prosthetics
  Redirect 301 /implantatsiya https://dental-home.ru/services/prosthetics
  Redirect 301 /gigiena https://dental-home.ru/services/hygiene
  Redirect 301 /lechenie https://dental-home.ru/services/vinirs
  Redirect 301 /anasteziologiya https://dental-home.ru/services/diagnostic


  # Redirect www to non-www
  RewriteCond %{HTTP_HOST} ^www\.(.*)$
  RewriteRule ^(.*)$ https://%1/$1 [L,R=301] 

  # Prerender.io configuration
  <IfModule mod_headers.c>
      # Set the prerender token
      RequestHeader set X-Prerender-Token "MY_TOKEN"
  </IfModule>
  
  RewriteCond %{HTTP_USER_AGENT} googlebot|bingbot|yandex|baiduspider|facebookexternalhit|twitterbot|rogerbot|linkedinbot|embedly|quora\ link\ preview|showyoubot|outbrain|pinterest|slackbot|vkShare|W3C_Validator [NC,OR]
  RewriteCond %{QUERY_STRING} _escaped_fragment_

  # Proxy the request to Prerender if it's a request for HTML, but not for certain file types
  RewriteRule ^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent|\.ttf|\.woff|\.svg|\.eot))(.*) http://service.prerender.io/https://dental-home.ru/$2 [P,L]

  # Existing rules
  RewriteRule ^index\.html$ - [L]
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-l
  RewriteRule . /index.html [L]

  ErrorDocument 404 https://dental-home.ru/error
  </IfModule>

введите сюда описание изображения


Ответы (0 шт):