I like to redirect my website.
Now I have:
https://www.old.example/NL/page
And it has to become
https://www.new.example/page
I know I can change the domain with
Normaly I would use something like this, but this would only change the domain:
RewriteCond %{HTTP_HOST} ^old.example/NL$ [OR]
RewriteCond %{HTTP_HOST} ^www.old.example/NL/$
RewriteRule (.*)$ https://www.new.example/$1 [R=301,L]
So now I am thinking of something like this:
RewriteRule %{HTTP_HOST} ^old.example/(NL)/([A-Za-z0-9_-]*)$ http://www.new.example/$2&%{QUERY_STRING} [R=301,L]
But this gives the following result:
http://www.new.example/NL/page
Can anyone help me with the right solution?