I am trying to redirect every url from a domain to a second "domain" and to keep the url part after the "/".
Here's an example of what I'm trying to do: When someone visits mydomain.com/any-url he should get redirected to urltracker.com/events/redirect_to=http%253A%252F%252Fseconddomain.com%252Fany-url
I'm currently using
RewriteEngine on
RewriteRule ^(.*)$ http://urltracker.com/events/redirect_to=http%253A%252F%252Fwww.seconddomain.com%252F$1 [R=301,L]
But this code redirects me to urltracker.com/events/redirect_to=http53A52F52Fseconddomain.com52Fany-url
Every "%2" disappears. Can you guys help me change the htaccess so it will not replace %2 ? Thanks!
Edit: What I actually need is to have all special characters after "redirect_to=" double encoded.