title: htaccess redirecting by query string
body: <p>i'm having difficulties about .htacces and i hope somebody can help..</p>
  
  <p>i need to make a redirection but cant get the query string value..
  (i'm also making a redirection www to now-www)</p>
  
  <pre><code>RewriteEngine On
  RewriteBase /
  RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
  RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
  
  RewriteCond %{SCRIPT_FILENAME} !-d
  RewriteCond %{SCRIPT_FILENAME} !-f
  RewriteRule ^(.*).htm$ index.php?route=$1 [L]
  </code></pre>
  
  <p>and when i making a request to /a/td.htm?td=2</p>
  
  <blockquote>
    <p>$_GET['route']</p>
  </blockquote>
  
  <p>prints </p>
  
  <pre><code>a/td
  </code></pre>
  
  <p>i need to get </p>
  
  <pre><code>a/td=2
  </code></pre>
  
  <p>unfortunately i couldn't find a way. </p>
  
  <p>Thanks in advance</p>