title: I am implementing a project where I have to accept all the url requests
body: <p>For example,</p>
  
  <p>If the base url is example.com which serves index.html as response and if the request is example.com/path, I have to return index.html as response. I know using a web framework will solve this issue, but I want to do it in pure javascript.</p>
  
  <p>Edit:
  If the base url is example.com then if I enter example.com/hello or example.com/world or example.com/anything in the browser url bar, i have to return the same index.html page.</p>