mywebsite.com/?version=037 -> github.com/repo_name/app.0.3.7.zip?raw =true
и код в простом html-файле выглядит следующим образом:
Код: Выделить всё
function getQueryStringArray(){
var assoc=[];
var items = window.location.search.substring(1).split('&');
for(var j = 0; j < items.length; j++) {
var a = items[j].split('='); assoc[a[0]] = a[1];
}
return assoc;
}
//point at which you want to determine redirection
var qs = getQueryStringArray();
var url = '';
if (qs.version !== 'undefined' && qs.version) {
switch (qs.version) {
case '037':
url = 'https://github.com/blah.zip?raw=true';
break;
case '03z':
url = 'https://github.com/meh.zip?raw=true';
break;
}
window.location.href = url; //reroute
}
Подробнее здесь: https://stackoverflow.com/questions/783 ... -with-curl
Мобильная версия