title: htaccess mod_rewrite no duplicate content
body: <p>I have written a rewrite rule to get all pages looking like</p>
  
  <pre><code>dealer_listings.php?territory=arizona
  </code></pre>
  
  <p>to be accessible like this</p>
  
  <pre><code>wholesale-parts/arizona/
  </code></pre>
  
  <p>I would like the ugly url to redirect to the seo friendly one as well.</p>
  
  <pre><code>Options -MultiViews
  RewriteEngine on
  &lt;FILES .htaccess&gt;  
  order allow,deny  
  deny from all 
  &lt;/FILES&gt; 
  
  RewriteRule ^([^/\.]+)/+([^/\.]+)/([^/\.]+)/?$ bussiness_profile.php? what=$1&amp;type=$2&amp;dealer=$3 [L]
  
  rewriterule ^wholesale-parts/([^/\.]+)/?$ dealer_listings.php?territory=$1 [R=301,L]
  
  rewritecond %{http_host} ^www.elite-dealers.com [nc]
  rewriterule ^(.*)$ http://elite-dealers.com/$1 [r=301,nc]
  
  RewriteRule ^(([^/]+/)*)index\.php http://elite-dealers.com/$1 [R=301,L]
  </code></pre>