title: Apache rewrite rule url parameters
body: <p>I am trying to capture all the parameters sent in the url and redirect pass it to a php file. Here is my rewrite rule </p>
  
  <pre><code>RewriteCond %{REQUEST_METHOD} ^GET
  RewriteRule ^/locations/(\w+\d*)+ /php/listone.php?name=$1 [L]
  </code></pre>
  
  <p>While this works correctly in the case when there are no white spaces in the url:</p>
  
  <pre><code>GET /locations/example HTTP/1.0
  </code></pre>
  
  <p>The $_GET['name'] in listone.php will contain example, but when I send </p>
  
  <pre><code>GET /locations/ex1 ex2
  GET /locations/ex%20ex2
  GET /locations/ex1+ex2 
  </code></pre>
  
  <p>In listone.php I gave the following:</p>
  
  <pre><code> $name = $_GET['name'];
   echo $name;
   $name = str_replace("+", " ", $name);
  </code></pre>
  
  <p>I will get just ex1. How can I capture all of them?</p>