title: localhost redirect to specific folder according to the parameter passed
body: <p>I have WAMP Server, and inside the WWW folder I have two folders</p>
  
  <pre><code>1 ) App_A
  2)  App_B
  </code></pre>
  
  <p>What I want is, if some one type the url <a href="http://localhost" rel="nofollow noreferrer">http://localhost</a> - It should redirect to App_B Folder, But if some one writes <a href="http://localhost/test" rel="nofollow noreferrer">http://localhost/test</a>, then I want to re-direct to App_A. How do I achieve that? </p>
  
  <p>I have made the following code but not working...</p>
  
  <pre><code>&lt;?php
  if(empty($_GET['test'])) {
      header("http://localhost/App_A");
  }
  else {
      header("http://localhost/App_B");
  }
  ?&gt;
  </code></pre>
  
  <p>Thanks</p>