I want to achieve the following with mod_proxy and mod_rewrite.
Ill use youtube as an example here.
1. User's browser is setup for proxy via my Apache proxy server.
2. User requests for a youtube page say http://www.youtube.com/watch?v=hN5avIvylDw
3. The requests goes through my proxy and an html page is returned which contains the url for the main video (something like)
http://www.youtube.com/get_video?video_ ... NDsqb682F& etc .
I want to redirect just the link for this main video to a diff domain say
http://www.mydomain.com/get_video?video ... NDsqb682F&
preserving the cgi params.
Whatever I try with "RewriteRule" only works on the main url typed in by the user, but not in the URL's embedded in the html page that is returned.
Any hints on how to solve this is appreciated?