title: htaccess url redirects with parameters not working
body: <p>I did a search of previous questions about URL redirects with parameters, but none seem to speak to my particular problem. I'm not a programmer so I don't really know how to adapt other suggestions to my situation. Specific HTACCESS strings to try (and adapt for other URLs) would really help me.</p>
  
  <p>I did an SEO restructure of my WP blog permalinks and I am finding that although the naked URLs are redirecting OK, URLs with parameters are not redirecting, they are going to a 404 error. I need URL parameters because my site is multilingual (Transposh plugin) so the "lang" parameter tells the site what language to translate the content to.</p>
  
  <p>I think I may need to create a bunch of HTACCESS redirects that will redirect old URLs with a language parameter to the new permalinks for those URLs and pass the lang parameter through. </p>
  
  <p>An example of this would be:</p>
  
  <pre><code>Source URL: /this-old-postname/?lang=(*)
  Destination URL /blog/this-new-postname/?lang=$
  </code></pre>
  
  <p>There's no way to predict the URL pattern (although the parameter pattern is predictable) as each URL was tweaked for best SEO contribution.</p>
  
  <p>I expect I'll need to write lots of these, each unique, so if you are able to provide an example can you please provide it for two redirects which would work for the following actual examples?</p>
  
  <pre><code>Source: http://www.travelnasia.com/thailand/bangkok/don-mueang-airport/?lang=zh
  Destination: http://www.travelnasia.com/thailand/don-mueang-airport-bangkok/?lang=zh
  
  Source: http://www.travelnasia.com/blog/map-attractions-bangkok-skytrain/?lang=zh
  Destination: http://www.travelnasia.com/blog/bangkok-skytrain-bts-mrt-lines/?lang=zh
  </code></pre>
  
  <p>MOD_REWRITE is already enabled and standard redirects created in HTACCESS do work. I am pretty sure to achieve this I will need to use:</p>
  
  <pre><code>RewriteCond %{QUERY_STRING} ^lang=(.*)$
  </code></pre>
  
  <p>I understand this ensures the query string is read from the source URL.</p>
  
  <p>I thought a redirect rule like this should work, but it doesn't:</p>
  
  <pre><code>RewriteRule ^test-redirect/$ http://test.travelnasia.com/destination/hanoi/hanoi-vietnam-destination-guide/$1 [L,QSA]
  </code></pre>
  
  <p>I've tried lots of other combinations but none of them seem to work. </p>
  
  <p>Thanks in advance for any help offered.</p>
  
  <p>Tony</p>