自动添加到URL的末尾

I am creating a tool for people to download, and install on their own. An easy install is what we are guided toward, and we will need a string like this: ?example=%s&example2=%m; to automatically be added to the end of a URL like this: http://example.com; automatically when the page is visited, without page redirection or anything.

So if a user downloads this, and installs it, you shall not have to make the URL: http://example.com?example=%s&example2=%m on their own.

I hope this is what you are asking pushState

<script type="text/javascript">
var ex1='feroz';
var ex2='akbar';
if (history.pushState) {
    var newurl = window.location.protocol + "//" + window.location.host + window.location.pathname + '?example='+ex1+'&example2='+ex2;
    window.history.pushState({path:newurl},'',newurl);
}
</script>