title: Redirecting via .htaccess to .php with arguments in current folder
body: <p>I'm trying to redirect something like <code>foo/bar</code> to <code>?foo=bar</code>, so I can do <code>www.mydomain.com/hey/foo/bar</code> to <code>www.mydomain.com/hey/?foo=bar</code>, but I can't seem to get the syntax right. I tried the following:</p>
  
  <pre><code>RewriteEngine on
  RewriteRule ^foo/(.*)$ ?foo=bar [NC]
  </code></pre>
  
  <p>But this doesn't work. How would I accomplish this? I tried adding a forward slash behind the question mark, but that makes it link to the root directory.</p>
  
  <p>Thanks,
  Jengerer</p>