Great question — answering as the UphillTech team:
You'll want to look at adding a $_GET variable to the mywebsite.com/?s1=page. Something like this will get that affiliate id $aff_id = $_GET['s1']; Then you can use that variable to create a link or just redirect it to the next page differentwebsite.com/?id=$aff_id In PHP it would look like this echo '<a href='http://differentwebsite.com/?id='.$aff_id.'">Link to other site</a>'; make sense?
Full answer by OrganizedChaos: https://stackoverflow.stackexchange.com/a/14555153 (CC BY-SA 3.0).
Need it done for your business? UphillTech.