como mudar a estrutura do url com o código 301 q2a

Tenho um problema com conteúdos duplicados no mecanismo de pesquisa.

Posso acessar uma página no site q2a usando ambas as url’s!

http://www.domain.com/index.php?qa=1306&qa_1=title

http://www.domain.com/1306/title

Quero redirect o primeiro para o segundo 1 como eu faço isso?

Eu tentei códigos nestas páginas e outras coisas também, mas nenhum deles funciona 🙁

htaccess para mudar index.php? ms = user to / user

meu htaccess atual é:

DirectoryIndex index.php  RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule . %1/%2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ index.php?qa-rewrite=$0&%{QUERY_STRING} [L] # Redirect non-www to www: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Redirect 301 /math/ http://math.domain.com/  

Eu usei isso e parece funcionar bem:

 DirectoryIndex index.php  RewriteEngine On #RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^users/?$ /index.php?qa=users [R=301,L] RewriteRule ^tags/?$ /index.php?qa=tags [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/qa-theme/.* RewriteCond %{REQUEST_URI} !^/qa-content/.* RewriteCond %{REQUEST_URI} !^/analytic/.* RewriteCond %{REQUEST_URI} !^/qa-plugin/.* RewriteCond %{REQUEST_URI} !^/help_files/.* RewriteRule ^(.*)/(.*)/?$ /index.php?qa=$1&qa_1=$2 [R=301,L] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/qa-theme/.* RewriteCond %{REQUEST_URI} !^/qa-content/.* RewriteCond %{REQUEST_URI} !^/analytic/.* RewriteCond %{REQUEST_URI} !^/qa-plugin/.* RewriteCond %{REQUEST_URI} !^/help_files/.* RewriteRule ^(.*)/(.*)/(.*)/?$ /index.php?qa=$1&qa_1=$2&qa_2=$3 [R=301,L] # Redirect non-www to www: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] Redirect 301 /math/ http://math.domain.com/