I am transferring a website, say example.com to yyy.com .
But example.com/a , and everything like example.com/a/* , should stay on example.com .
But there is something else: I have routes called something like example.com/ab/* , and this should be redirected to yyy.com/ab/* (as well as the rest of the site).
I can get the site to redirect everything except example.com/a* correctly, but that means example.com/ab not redirecting ...
I tried to write the following rules in my .htaccess, in vain:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} !^a$ RewriteCond %{REQUEST_URI} !^a\/.*$ RewriteRule ^(.*)$ http://www.yyy.com/$1 [R=301,L]
or even:
RewriteEngine On RewriteBase / RewriteCond %{REQUEST_URI} ^ab RewriteRule ^(.*)$ http://www.yyy.com/$1 [R=301,L] RewriteCond %{REQUEST_URI} !^a RewriteRule ^(.*)$ http://www.yyy.com/$1 [R=301,L]
(Changing the name of the route is not an option)
source share