Q:

URL Redirect - URL is appended to a new one instead of completely redirecting it

I have the following redirects:
Redirect 301 /TEST/ https://www.newdomain.com

Redirect 301 /somethingelse/mobile/ https://www.newdomain.com/somethingelse

Redirect 301 /MY-STUFF/my-portfolio/ https://www.newdomain.com/my-portfolio

The first one works, but the second and third one redirects to these wrong URLs:
https://www.newdomain.commobile/
https://www.newdomain.commy-portfolio/

Bur I'm expecting these redirections as a result: 
https://www.newdomain.com/somethingelse
https://www.newdomain.com/my-portfolio

Can anyone please help?  What I'm doing wrong? 

A:

Use RedirectMatch directive instead of Redirect to get a precise match:
RedirectMatch 301 ^/TEST/?$ https://www.newdomain.com

RedirectMatch 301 ^/somethingelse/mobile/?$ https://www.newdomain.com/somethingelse

RedirectMatch 301 ^/MY-STUFF/my-portfolio/?$ https://www.newdomain.com/my-portfolio

Make sure to test it in a new browser or after clearing your browser cache.