title: "The page isn't redirecting properly" using redirect in .htaccess wordpress
body: <p>I’m trying to rewrite the url from <code>example.com/sub/sub1</code> to <code>example.com/sub1</code> and remove the <code>/sub/</code> path every time there is a <code>/sub1</code> next to it.</p>
  
  <p>My solution redirects to <code>example.com/sub1</code> properly, but I am getting a loop redirect with the error message: </p>
  
  <blockquote>
    <p>The page isn't redirecting properly.</p>
  </blockquote>
  
  <p>My <code>.htaccess</code> file:</p>
  
  <pre><code>RedirectMatch 301 /sub(/.*)sub1 $1sub1
  </code></pre>
  
  <p>Any ideas on how to fix this?</p>
  
  <p>Thanks, guys.</p>
  
  <p>Edit: should be <strong>RedirectMatch 301 /sub(/.*)sub1 $1sub1</strong></p>