.htaccess 301 redirect not working on WordPress site

I’m trying to redirect domain.com/our-team/team-member/ to domain.com/about/

Here is the .htaccess code that I’m using:

Read More

RedirectMatch 301 ^/our-team/team-member(.*) ^/about/$1

However what happens with that code is that I’m redirected to http://domain.com/about/team-member/, which is essentially 404 page.

I’ve tried numerous variations on this htaccess rule with no luck as of yet.

Could something else be at play here? Could this be related to the way WordPress works, or something going on with the shared Go Daddy hosting environment the site is hosted in?

Related posts

Leave a Reply

1 comment

  1. You have a bad target URL starting with ^. Also it is better not to mix mod_alias rules i.e. RedirectMatch with other mod_rewrite rules of WP. Use this rule just below RewriteBase line in your main WP htaccess:

    RewriteRule ^our-team/team-member(/.*)?$ /about$1 [L,R=301,NC]