Change parameter names in redirect with htaccess
<p>I am trying to do a redirection from old structured links to the new version in htaccess, but I am having no luck.</p>

<p>And the other answers in Stackoverflow dont help.</p>

<p>So I have this link type of link</p>

<pre><code>www.example.com/listings/cat/shoes/state/nevada
www.example.com/listings/cat/heels/state/arkansas
www.example.com/listings/cat/skirts/state/florida
</code></pre>

<p>Which I want to convert to </p>

<pre><code>www.example.com/directory/cat/shoes/region/nevada
www.example.com/directory/cat/heels/region/arkansas
www.example.com/directory/cat/skirts/region/florida
</code></pre>

<p>I have tried this but didn't work as expected.</p>

<pre><code>RedirectMatch 301 /listings/cat/(.+)$/state/(.+)$ http://www.example.com/directory/cat/$1/region/$2
</code></pre>