Answers.Body: <p>Apparently my above code was correct, save for I was putting it in our main directory's htaccess file. Once placed in the subdirectory's file (and "sub_dir" removed) all is right!</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-25T21:51:35.253Z
Answers.LastActivityDate: 2015-06-25T21:51:35.253Z
Answers.UserDisplayName: RayWright
Answers.Body: <p>I'm not a Joomla person, but Drupal has a "URL Aliases" module that lets you do redirects from within Drupal.  It looks like <a href="http://www.inmotionhosting.com/support/edu/joomla-25/303-using-the-redirect-manager" rel="nofollow">Joomla has something similar</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-25T21:04:22.340Z
Answers.Text: So it does, never knew that existed. Unfortunately, I most likely won't be able to keep the old install up when the new Wordpress site is live. But I did test it and it does not seem to be playing nice - perhaps that means I have a bigger issue. I will continue to read on the redirect manager in the case it does present a viable solution, thank you.
Answers.UserDisplayName: RayWright
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-25T20:50:58.997Z
Answers.LastActivityDate: 2015-06-25T20:50:58.997Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Body: <p>I'm moving our civi from Joomla to Wordpress and as a part of the process I wanted to set up some redirects for our existing PCP pages. As you all know civi URLs are kind of long: baseurl.com/sub_dir/index.php/component/civicrm/?task=civicrm/pcp/info&amp;reset=1&amp;id=XX</p>
  
  <p>I've found several posts explaining query string redirects like this one (<a href="http://simonecarletti.com/blog/2009/01/apache-query-string-redirects/" rel="nofollow">http://simonecarletti.com/blog/2009/01/apache-query-string-redirects/</a>) but in all of them their variable is right after the "?". I have tried the following to no avail:</p>
  
  <pre><code>RewriteEngine on
  RewriteCond %{QUERY_STRING} task=civicrm/pcp/info&amp;reset=1&amp;id=20$
  RewriteRule ^sub_dir/index\.php/component/civicrm/$ /path-to-new-location/? [L,R=301]
  </code></pre>
  
  <p>Eventually, I do want to write it with variables (as we have several hundred PCPs but I wanted to get something working first.) Any help is greatly appreciated!!!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-25T20:43:43.433Z
Comments.Text: I'm voting to close this question as off-topic because it's about Apache, not CiviCRM.  I think you'll get better answers on webmasters.stackexchange.com or stackoverflow.com.
Comments.UserDisplayName: Jon G - Megaphone Tech
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-25T20:46:57.750Z
Comments.Text: I've scoured those sites a bit and have struggled to find an appropriate solution, I just thought someone in the civi world would have done something similar before. Wasn't trying to break the rules.
Comments.UserDisplayName: RayWright
Tags: <pcp><urls>
Title: Redirect with a QUERYSTRING help - migrating site
ThreadText: # Redirect with a QUERYSTRING help - migrating site
  
  (Asked by: username_0 on 2015-06-25)
  
  I'm moving our civi from Joomla to Wordpress and as a part of the process I wanted to set up some redirects for our existing PCP pages. As you all know civi URLs are kind of long: baseurl.com/sub_dir/index.php/component/civicrm/?task=civicrm/pcp/info&reset=1&id=XX
  I've found several posts explaining query string redirects like this one (http://simonecarletti.com/blog/2009/01/apache-query-string-redirects/) but in all of them their variable is right after the "?". I have tried the following to no avail:
  RewriteEngine on
  RewriteCond %{QUERY_STRING} task=civicrm/pcp/info&reset=1&id=20$
  RewriteRule ^sub_dir/index\.php/component/civicrm/$ /path-to-new-location/? [L,R=301]
  
  Eventually, I do want to write it with variables (as we have several hundred PCPs but I wanted to get something working first.) Any help is greatly appreciated!!!
  
  **Tags:** pcp, urls
  
  > **Comments:**
  > **username_1**: I'm voting to close this question as off-topic because it's about Apache, not CiviCRM.  I think you'll get better answers on webmasters.stackexchange.com or stackoverflow.com.  
  > **username_0**: I've scoured those sites a bit and have struggled to find an appropriate solution, I just thought someone in the civi world would have done something similar before. Wasn't trying to break the rules.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-06-25. Score: 1 | Accepted answer
  
  Apparently my above code was correct, save for I was putting it in our main directory's htaccess file. Once placed in the subdirectory's file (and "sub\_dir" removed) all is right!
  
  
  ---
  
  ### Answer by username_1 on 2015-06-25. Score: 0
  
  I'm not a Joomla person, but Drupal has a "URL Aliases" module that lets you do redirects from within Drupal. It looks like [Joomla has something similar](http://www.inmotionhosting.com/support/edu/joomla-25/303-using-the-redirect-manager).
  
  > **Comments:**
  > **username_0**: So it does, never knew that existed. Unfortunately, I most likely won't be able to keep the old install up when the new Wordpress site is live. But I did test it and it does not seem to be playing nice - perhaps that means I have a bigger issue. I will continue to read on the redirect manager in the case it does present a viable solution, thank you.  
  
  ---
  
  