title: Why React Application doesn't work in hosting subdirectory?
body: <p>I have a React app with the react router.
  After build I try to start react app on my hosting server.
  App is working in root directory <code>/example.com</code> correctly.
  But I want to run it at subdirectory like <code>/example.com/sub</code> and it doesn't work.
  It's possible, problem in <code>.htaccess</code> file.
  Here's  <code>.htaccess</code> content</p>
  <pre class="lang-xml prettyprint-override"><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; 
  </code></pre>