I have a certain akamaized video url of form -
https://gcs-vimeo.akamaized.net/exp=<expiry-in-milliseconds>~acl=%2A%2F<9-digit-video-code>.mp4%2A~hmac=<64-char-alphanumeric>/vimeo-prod-skyfire-std-us/<2-digits>/<4-digits>/<1-digit>/<9-digits>/<same-9-digit-video-code>.mp4
I can download this url via Internet Download Manager (in Browser), curl, wget, and python-requests
library. I can even play it directly if I put the url in the search bar.
My video tag looks like this -
<video src='/play/<random-string>' controls></video>
And my apache RewriteRule
is this -
RewriteRule ^play/([a-z]+)$ <video-url>
My problem is that despite being able to download this video from IDM, curl, wget and python-requests
, I am unable to redirect to this URL successfully. The video works fine if I write it directly in the `src' attribute, but not if I redirect as mentioned above.
The headers of the request when url specified directly in src
attribute and video runs -
Accept:*/*
Accept-Encoding:identity;q=1, *;q=0
Accept-Language:en-US,en;q=0.8
Cache-Control:max-age=0
Connection:keep-alive
Host:gcs-vimeo.akamaized.net
Range:bytes=0-
Referer:http://<domain>/<some-end-point>
User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36
On successful load (by directly specifying the URL) I get either 200 OK
or 206 Partial Content
On failure (by trying to run video via redirect) I get some (canceled)
status.
Someone help.