The structure of my site changed, so I have to redirect some of the urls.
I redirected some of the urls to the new url in the .htaccess file, that works fine:
Redirect 301 /folder/oldfolder1 https://www.domain.com/newfolder1/
Redirect 301 /folder/oldfolder2 https://www.domain.com/newfolder2/
I have one folder with several files, hundreds, that I need to redirect all to the same url.
I have tried several rewrite rules, but can’t get it work:
RewriteRule /folder/node https://www.domain.com/newfolder3/ [R=301]
or
RewriteRule /folder/node/(.*)$ https://www.domain.com/newfolder3/ [R=301]
The urls that I want to redirect are for example:
https://www.domain.com/folder/node/4643
https://www.domain.com/folder/node/40
https://www.domain.com/folder/node/4243
They should all be sent to https://www.domain.com/newfolder3/
I would appreciate some input, Thanks!