I believe the following code will redirect my old domain to my new domain keeping the same URL paths.
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.newdomain\.co.uk
RewriteRule (.*) https://www.newdomain.co.uk/$1 [R=301,L]
However, I also have some URLS from my old site that don't exist on my new site, so they would return a 404 with the rule above.
How do I redirect these to an alternative URL path?