title: .htaccess php query strings
body: <p>This is a problem with page redirection in an .htaccess ile, when the pages are idenified by a dynamic PHP string.</p>
  
  <p>I'm not sure anyone can help me with this. It may be an insoluble problem.</p>
  
  <p>I have just moved a client to a new Web site, in which properties for sale are in one subfolder, and properties for rent in another. (On the old site, they were all in the top folder.)</p>
  
  <p>The pages are identified like this:</p>
  
  <pre><code>show-property.php?prop=[number]
  </code></pre>
  
  <p>If all properties were going to the same sub-folder, one rule would cover all. But I have to send some properties to the rentals sub-folder, and others to the sales sub-folder, depending on the specific number.</p>
  
  <p>There are 60 active sales properties and 77 active rentals properties.</p>
  
  <p>So I put into the .htaccess file on the old site 137 individual rules, like these:</p>
  
  <pre><code>Redirect 301 /show-property.php?prop=100 https://[new-domain]/**rentals**/show-property.php?prop=100
  
  Redirect 301 /show-property.php?prop=101 https://new-domain]/**sales**/show-property.php?prop=101
  </code></pre>
  
  <p>Not surprisingly, none of them works.</p>
  
  <p>With 137 distinct pages, and 2 different destinations, can this problem be solved?</p>