title: Passing Parameters through url with slashes
body: <p>I am trying to pass variables through the url without including ?var1=test but have that replaced with /test. I have the following code:</p>
  
  <pre><code>$pathinfo = isset($_SERVER['PATH_INFO']) ? $_SERVER['PATH_INFO'] : $_SERVER['REDIRECT_URL'];    
  $params = preg_split('|/|', $pathinfo, -1, PREG_SPLIT_NO_EMPTY);
  print_r($params);
  </code></pre>
  
  <p>This issue is, if I put this in the index.php file, I have to include the filename.</p>
  
  <p>What I get:
  <a href="http://example.com/index.php/test" rel="nofollow">http://example.com/index.php/test</a></p>
  
  <p>What I want:
  <a href="http://example.com/test" rel="nofollow">http://example.com/test</a></p>
  
  <p>What should I do?</p>