I need to create redirects:
www.mysite.com/out/cars/ to https://cars.example.com/?aid=123 (not working)
RewriteCond %{THE_REQUEST} /out/cars [NC]
RewriteRule ^ https://cars.othersite.com/?aid=123 [NE,L,R=302]
www.mysite.com/out/cars/volvo/ to https://cars.example.com/volvo/?aid=123 (works)
RewriteCond %{THE_REQUEST} /out/cars/([^/]+) [NC]
RewriteRule ^ https://cars.othersite.com/%1/?aid=123 [NE,L,R=302]
www.mysite.com/out/cars/volvo/vagon/ to https://cars.example.com/volvo/vagon/?aid=123 (works)
RewriteCond %{THE_REQUEST} /out/cars/([^/]+)/([^/]+) [NC]
RewriteRule ^ https://cars.othersite.com/%1/%2/?aid=123 [NE,L,R=302]
www.mysite.com/out/bikes/ to https://bikes.example.com/?aid=123 (not working)
RewriteCond %{THE_REQUEST} /out/bikes [NC]
RewriteRule ^ https://bikes.othersite.com/?aid=123 [NE,L,R=302]
www.mysite.com/out/bikes/suzuki/ to https://bikes.example.com/suzuki/?aid=123 (not working)
RewriteCond %{THE_REQUEST} /out/bikes/([^/]+) [NC]
RewriteRule ^ https://bikes.othersite.com/%1/?aid=123 [NE,L,R=302]
www.mysite.com/out/bikes/suzuki/volusia to https://bikes.example.com/suzuki/volusia/?aid=123 (works)
RewriteCond %{THE_REQUEST} /out/bikes/([^/]+)/([^/]+) [NC]
RewriteRule ^ https://bikes.othersite.com/%1/%2/?aid=123 [NE,L,R=302]
www.mysite.com/out/atv/bmw/black/big/best/ to https://atv.example.com/bmw/black/big/best/?aid=123 (works)
RewriteCond %{THE_REQUEST} /out/atv/([^/]+)/([^/]+)/([^/]+)/ [NC]
RewriteRule ^ http://atv.example.com/%1/%2/%3/?aid=123 [NE,L,R=302]
Thing is, some rules work but not all of them. I guess they interfere in some way, but I tried to change what I could and nothing worked for 100% :(
What happens is for example that this:
www.mysite.com/out/bikes/suzuki/
redirects to:
https://bikes.example.com/suzuki/%20http/?aid=123
etc. :(
Anybody could help? Thank you very much in advance!