title: mod_rewrite how to: convert folders in url to get parameters
body: <p>I am trying to use mod_rewrite to basically do the same thing as <a href="https://stackoverflow.com/questions/658978/mod-rewrite-convert-folders-in-url-into-query-parameters">this post</a> ie to convert folders in url into query-parameters, and I like the rewrite rules given there:</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME) (myserver) [NC]  #my addition for my sandbox
  RewriteRule ^([^/]*)/?([^/]*)/?([^/]*)/?([^/]*)/?([^/]*)/?$ index.php?one=$1&amp;two=$2&amp;three=$3&amp;four=$4&amp;five=$5
  </code></pre>
  
  <p>but will that work in the .htaccess file or does it need to go in the http.conf file?</p>
  
  <p>I am testing this out on my sandbox machine which uses <a href="http://172.xx.xx.xx/myserver/" rel="nofollow noreferrer">http://172.xx.xx.xx/myserver/</a>
  for this web apps url.  On the actual server of course there is no /myserver/ folder needed.
  So on the actual server I could maybe get away with putting  a .htaccess file in the root or maybe the mod directive in the http.conf (or can't I?) but on my sandbox what can I do to get this working?  </p>
  
  <p>To reiterate: if I use this url: <a href="http://my.ip.add.res/myserver/aaa/bbb/ccc" rel="nofollow noreferrer">http://my.ip.add.res/myserver/aaa/bbb/ccc</a>
  I want it rewritten to: /myserver/index.php?one=aaa&amp;two=bbb&amp;three=ccc  etc
  Should I put the command in the .htaccess in the myserver folder or elsewhere?</p>
  
  <p>PS I am using apache 2.2.3 on CentOS.</p>