title: How to handle empty URL parameter in react router dom (4.xx)
body: <p>I have route defined as below :</p>
  
  <pre><code>&lt;Route path='/result/:searchTerm' component={Result}/&gt;
  </code></pre>
  
  <p>It works fine. For example <code>localhost:3000/result/cat</code> page works. But when the user decided to remove the <code>:searchTerm</code> from the URL and opens just <code>localhost:3000/result/</code> it shows empty page. No errors or anything. Just empty page. It is not even hitting my component <code>{Result}</code> too.</p>
  
  <p>So my doubt is how to handle this scenario.? Say I want to redirect the user who tries to open <code>/result/</code> without <code>:searchTerms</code> to my index page.? How to do that.?</p>