I want to 301 redirect my entire WordPress money site from https:// moneysite.com/%category%/%postname%/ to simply https:// moneysite.com/%postname%/ , but exclude everything in a CPT called 'team' which uses the permalink like https://www.moneysite.com/team/rogger/. I have googled for this, but didn't come up with anything, or I didn't think what I saw was right.
I also want to redirect http to https and remove the www from the permalink. Please guide me a bit. It will be very helpful for me as i am spending countless hours in setting this up.
I got a code but it's not excluding and removing permalink "Team" from the pages as well.
RedirectMatch 301 ^/([^/]+)/([^/]+)/$ https://moneysite.com/$2