Rewrite url Apache

Bye, i would need to rewrite the url on apache virtual host. In my case i have a url that if it contains "/file/" must redirect to another domain.

Example.

FROM --> https://blog.test.it/files/uploads/4581642077183.jpg

TO ...> https://www.test.it/files/uploads/4581642077183.jpg

How should I proceed?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum