php - Modifying URL in javascript -


i have following script:

$( document ).ready(function() {          $.getscript("http://www.anrdoezrs.net/am/7825092/include/allcj/generate/onload/am.js", function(){     settimeout(function(){              window.location =  $('#cjlink').attr('href');     }, 500);          });      }); 

which supposed redirect link generated am.js.
modify link generated am.js replace domain34.com/us or domain34.com/ domain34.com/uk

i tried htaccess not find way rewrite outgoing urls need method via php or js.

as mentioned in ajax.getscript documentation, should pass data argument, add js replace [insert adresse here] wich redirected.

as asked op. not tested code thou, js file not loaded reason:

$(document).ready(function(){     $.getscript("http://www.anrdoezrs.net/am/7825092/include/allcj/generate/onload/am.js", function(data){         data = data.replace('domain34.com/us', 'domain34.com/uk');         data = data.replace('domain34.com/', 'domain34.com/uk');         window.location.replace(data);     }); }); 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -