title: Adding rewrite conditions to the existing ones
body: <p>We had out customer request to redirect their custom url to specific page  in the webshop directory, for that we setup a rewrite rule with rewrie condition as shown below</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} abc.xxx.com$ [NC]
  RewriteRule ^/$ /online/index.php3?shopid=111 [R]
  RewriteCond %{HTTPS_HOST} abc.xxx.com$ [NC]
  RewriteRule ^/$ /online/index.php3?shopid=111 [R]
  </code></pre>
  
  <p>As shown in above rules and condition the request coming from abc.xxx.com will be redirected to the web page in the webshop id 111 and it worked successfully</p>
  
  <p>After few weeks the same customer had another request to add another URL for redirection for differn webshop ID 112
   I used the similar rewrite rule and condition replacing the new URL and webshop  id, and added it below the old rewrite condition and rules and restarted the apache but when i tested the new URL it was redirecting to shop ID 111 instead of 112.</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} def.xxx.com$ [NC]
  RewriteRule ^/$ /online/index.php3?shopid=112 [R]
  RewriteCond %{HTTPS_HOST} def.xxx.com$ [NC]
  RewriteRule ^/$ /online/index.php3?shopid=112 [R]
  </code></pre>
  
  <p>Later I had some work around and changed the order,I put the new rewrite rules and conditions first i.e ahead of the old rules and it worked perfaclty fine.</p>
  
  <p>Does anybody have idea about this characteristic of the rewrite rules?</p>