title: .htaccess redirection rule to redirect similar URLs with different structure
body: <p>I need to rewrite a rule in a .htaccess. I have users coming from google to my old site links that doesn't exist anymore.</p>
  
  <p>Old site:</p>
  
  <pre><code>oldsite.com/search/pdf/harry-potter-reviews
  </code></pre>
  
  <p>I need to redirect to:</p>
  
  <pre><code>newsite.com/search/docs/harry+potter+reviews
  </code></pre>
  
  <p>The redirect should be 301? (Google safe for moved content).</p>