If you need to redirect a URL with encoded characters you may discover that mod_rewrite does not work well with them.
If your source URL is:
You will notice that a standard redirect will work fine without encoded characters, but as soon as you hit the encoded characters you will get a 404 instead of a redirect.
To get around this problem, you can turn AllowEncodedSlashes on in your VirtualHost.
RewriteRule ^/somePage/fromURL=(.*) http://mydomain.com [L,R=301]