title: Redirecting URLs (with specific GET parameters)
body: <p>I have this old survey link that is has been superseded by another link, so basically I want anyone trying to access the URL:</p>
  
  <p><a href="http://mywebsite.com/survey/view_survey.php?surveyID=1" rel="nofollow noreferrer">http://mywebsite.com/survey/view_survey.php?surveyID=1</a></p>
  
  <p>To be redirected to: </p>
  
  <p><a href="http://mywebsite.com/survey/view_survey.php?surveyID=2" rel="nofollow noreferrer">http://mywebsite.com/survey/view_survey.php?surveyID=2</a></p>
  
  <p>Can I do this in the Apache configuration or htaccess file?</p>
  
  <p>I tried the following rule in the Redirect section of my httpd.conf file:</p>
  
  <pre><code>Redirect 301 /survey/view_survey.php?surveyID=1 http://mywebsite.com/survey/view_survey.php?surveyID=2
  </code></pre>
  
  <p>But it doesn't work. I am suspecting that the GET parameters are not used when processing the rule.</p>
  
  <p>Is my only option to hack my code to redirect on a specific surveyID?</p>
  
  <hr>
  
  <p>Following the suggestion of using the Rewrite rules, I tried the following in my .htaccess file:</p>
  
  <pre><code>RewriteRule ^survey/view_survey\.php\?surveyID=1525$ /survey/view_survey.php?sur
  veyID=1607
  </code></pre>
  
  <p>But that doesn't work. I do have the rewrite engine up and running, because I have another rewrite rule currently running.</p>