title: React doesn't route when writing manually .htaccess
body: <p>I'm trying to set <code>.htaccess</code> file to route <code>React</code> pages. Here is my Router:</p>
  <pre><code>&lt;Route path = &quot;/&quot; component = {App}&gt;
      &lt;Header propContext={{useUserContext, setUserContext}}/&gt;
      &lt;Route exact path=&quot;/&quot; component={Index} /&gt;
  
      &lt;Route path=&quot;/index&quot; component={Index} /&gt;
      &lt;Route path=&quot;/xxx/:id&quot; component={Xxx} /&gt;
      &lt;Route path=&quot;/somepath&quot; component={Somepath} /&gt;
      &lt;Route path=&quot;/anotherpath&quot; component={Anotherpath} /&gt;
      &lt;Route path=&quot;/yyy/:id&quot; component={Yyy} /&gt;
      
      &lt;Footer /&gt;
  &lt;/Route&gt;
  </code></pre>
  <p>And here is my <code>htaccess</code> file on the server:</p>
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.html$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l
    RewriteRule . /index.html [L]
  &lt;/IfModule&gt;
  
  RewriteCond %{HTTPS} off [OR]
  RewriteCond %{HTTP_HOST} !^www\. [NC]
  RewriteCond %{REQUEST_URI} !^/\.well-known/acme-challenge/[0-9a-zA-Z_-]+$
  RewriteCond %{REQUEST_URI} !^/\.well-known/cpanel-dcv/[0-9a-zA-Z_-]+$
  RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/(?:\ Ballot169)?
  RewriteCond %{REQUEST_URI} !^/\.well-known/pki-validation/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
  RewriteRule (.*) https://example.com%{REQUEST_URI} [R=301,L]
  </code></pre>
  <p>When I write manually the URL the <code>https://example.com/index</code> , <code>https://example.com/somepath</code>, <code>https://example.com/anotherpath</code> URLs work fine. But <code>https://example.com/xxx/14</code> or <code>https://example.com/yyy/53</code> URLs don't work, show blank page and throws these error on the console:</p>
  <pre><code>Uncaught SyntaxError: Unexpected token '&lt;'
  Uncaught SyntaxError: Unexpected token '&gt;'
  Manifest: Line: 1, column: 1, Syntax error.
  </code></pre>
  <p>I've found <a href="https://stackoverflow.com/a/36623117/284199">this</a> answer, but at <a href="https://www.edureka.co/community/67651/error-react-router-urls-work-when-refreshing-writing-manually?ranMID=42536&amp;ranEAID=a1LgFw09t88&amp;ranSiteID=a1LgFw09t88-AqXixUK.cjvzwwvW4I13ow&amp;LSNSUBSITE=Omitted_a1LgFw09t88" rel="nofollow noreferrer">here</a> someone suggested htaccess.</p>