title: Rewriting Query String URL in htaccess with 301 Redirect
body: <p>I have tried to find a solution to my problem in the other asked questions on Stackoverflow, but though there a lot of such questions answered for the exact same question yet it is different because I am asking as to how I should define more than two query strings in the ReWrite Condition,</p>
  
  <p>I am trying to do a 301 redirect on a query string URL:</p>
  
  <blockquote>
    <p><a href="http://abc.com/index.php?arg1=abc&amp;arg2=abc" rel="nofollow">http://abc.com/index.php?arg1=abc&amp;arg2=abc</a></p>
  </blockquote>
  
  <p>to mask it as</p>
  
  <blockquote>
    <p><a href="http://abc.com/prettified_url" rel="nofollow">http://abc.com/prettified_url</a></p>
  </blockquote>
  
  <p>,and have tried using the following code in htaccess:</p>
  
  <pre><code>RewriteRule ^http://abc.com/index.php?arg1=abc&amp;arg2=abc$ /prettified_url  [R=301,L,NC]
  </code></pre>
  
  <p>have also tried using:</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} !^.*abc\.com
      RewriteRule .? - [S=2]
      RewriteCond %{REQUEST_URI} ^index.php
      RewriteCond %{QUERY_STRING} ^arg1=abc [NC]
      RewriteCond %{QUERY_STRING} arg2=abc [NC]
      RewriteRule ^(.*)$ /prettified_url [R=301,L]
  
      RewriteRule .? - [S=1]
      RewriteRule - -
  </code></pre>
  
  <p>have also tried using the following code in the query string ReWrite Condition:</p>
  
  <pre><code>RewriteCond %{QUERY_STRING} ^arg1=abc&amp;arg2=abc [NC]
  </code></pre>
  
  <p>Though, I am not able to see it being redirected to <strong>/prettified_url</strong>.</p>