I want all urls to be redirected, except my sitemap xml file in the root directory. The htaccess should allow https://old-domain/xml.xml to resolve with HTTP 200, but it is still redirecting to the new domain at the moment. How can I exclude the file (xml.xml) from the redirect?
RewriteEngine On
RewriteCond %{REQUEST_URI} !^/xml\.xml$
RewriteCond %{HTTP_HOST} ^old-domain\.de$ [OR]
RewriteCond %{HTTP_HOST} ^www\.old-domain\.de$
RewriteRule (.*)$ https://new-domain.de/$1 [R=301,L]
</IfModule>