I have problems with the redirection of my old website to our new website under a new domain. The old website was created with Wordpress and the simple redirect 301 was successful. However, some pages have this structure:
old.example/hotel/
old.example/hotel/suites/
old.example/hotel/rooms/
old.example/hotel/studio-apartments/
I had problems redirecting this to the new website because the simple redirect 301 only worked for the /hotel
redirection.
I have also tried this:
RedirectMatch 301 /hotel/(.*) https://new.example/accommodation/
But this redirects all pages to the same new one. I would like to accomplish this:
old.example/hotel/
tohttps://new.example/accommodation/
old.example/hotel/suites/
tohttps://new.example/suites/
old.example/hotel/rooms/
tohttps://new.example/rooms/
old.example/hotel/studio-apartments/
tohttps://new.example/studio-apartments/
I would really appreciate any help!