If i have an html file located at http://sample.com and that html file is loading in an asset with an ajax call, can the server intercept that asset and deliver a different asset without the html file changing the url or adding url parameters to the asset ur;?
example: http://sample.com/index.html?configID=567 has a config.json file being loaded with ajax like this:
$.getJSON('config.json', function(data){});
can apache know that this config.json
file is being requested by an html file that has a url parameter of configID=567
and pass back a response from config567.json instead of config.json?
I can't modify the javascript in the html file to read $.getJSON('config.json?configID=567', function(data){});
so I would like to just do the modifications on the server side.
I also have php running as well if there is a php solution for this without changing the html file to a php file.