title: .htaccess 301 redirects for part of url
body: <p>I am redesigning my website and in the process restructuring some of the linking structure.</p>
  
  <p>To do the permanent redirects I am using the following code (.htaccess)</p>
  
  <pre><code>RedirectMatch permanent old-link($|\.html) http://thedomain.com/new-link.url
  </code></pre>
  
  <p>I am using a CMS and changing the link for a category changes the path of the url like so:</p>
  
  <pre><code>thedomain.com/old-category-link/old-article-url.html
  </code></pre>
  
  <p>to </p>
  
  <pre><code>thedomain.com/new-category-link/old-article-url.html
  </code></pre>
  
  <p>How should I code (.htaccess) the redirect of any URL that has </p>
  
  <pre><code>thedomain.com/old-category-link
  </code></pre>
  
  <p>(i.e   </p>
  
  <pre><code>thedomain.com/old-category-link/old-article.html
  thedomain.com/old-category-link/old-article-2.html
  thedomain.com/old-category-link/old-article-999.html
  </code></pre>
  
  <p>)</p>
  
  <p>to </p>
  
  <pre><code>thedomain.com/new-category-link/any-articles-old-url.html
  </code></pre>
  
  <p>Thank you</p>