I am using nginx and I have already add the line
Location/file/ { ^/file/([0-9]+)/([0-9]+)/([ ^/]*)/([0-9]+)/(. *) $/file. php? ID=$1&server=$2&hash=$3&expire=$4& File=$5last; }
In the conf file of the domain.
But the videos does not play.
I have a try copy the parameters from the link to something like
http://www.mydomain.com/file.php?id=1&server=0&hash=796609733f08c4bb8b89&expire= 1464380369&file=mp4/1.mp4
And I can see the mp4 file playing if I put the URL directly on the browser.
Yet it would return 403 if I put the follow directly on the browser.
http://www.mydomain.com/file/1/0/796609733f08c4bb8b89/1464380369/mp4/1.mp4
So I suppose it was the problem of rewrite but I am not being able to figure out the causes.
How can I fix this problem?
OK, eventually I has figured it out.
We have the use
Location ^~/file/ { ^/file/([0-9]+)/([0-9]+)/ ([^/]*)/([0-9]+)/(. *) $/file. php? ID=$1&server=$2&hash=$3&expire=$4& File=$5last; }
Instead of
location/file/{...}. ...}
Otherwise it'll keep searching for expressions and
Location ~ \.mp4 {.........}
Which appears later would override the search for/file/, because apparently there would be a ". mp4" at the end Of/file/ur L.
I suggest symtab to change the instruction in the script zip file.
http://forum.adultscriptpro.com/viewtopic.php?id=3627
A Script Pro nginx url Rewrite rule fails to play MP4 workaround