I am working with a web service that allows the video file (host).
Any way, they provide a Guid which is used in an embed code (link to JS file) is.
Script.js parses this URL and retrieves the variable. Can anyone make a clue about how this is done?
What kind of script runs on server-side to answer these requests? After all, the string in the URL does not really refer to a real directory, or is it?
Any help / insight will be appreciated.
They rewrite the URL most likely and pass that ID to a script By generating javascript - I should embed any video-specific data in javascript. A Javascript file does not have the knowledge of the URL, where it resides, only the window's URL or the frame where it is being loaded.
foo.com/$1/script.js - & gt; Foo.com/gen_script?id=$1
Where foo.com/gen_script?id=$1
is a script that actually generates that file.
If they use something like mod_rewrite, then you will find something similar to the following in your config file:
RewriteRule ^ (. *) / Script \ .js $ Http: // foo. Com / gen_script? Id = $ 1
Comments
Post a Comment