title: Render page dynamically on client side using vanilla js
body: <p>Suppose, I have js files along with the router.</p>
  <p>// index.js   -&gt; / (route)</p>
  <p>Home Page</p>
  <p>// about.js    -&gt; /about (route)</p>
  <p>About Page</p>
  <ol>
  <li><p>I have configured the code using history api such that it can go to /about from home page. But, when I directly land on localhost:5500/about, it gives me 404 error. Is there a way to make it land on localhost:5500/about directly and if it lands on any other page such as localhost:5500/err, it should fallback to &quot;/&quot; route.</p>
  </li>
  <li><p>Also, how can I manage conditions such as localhost:5500/about/{user_id} using dynamic routing. All the solutions I found uses server to fetch page but I want the routing to handled at the client side itself.</p>
  </li>
  </ol>