CiviMail - Error 500 when tracking clickthroughs
This seems to be an issue with 4.7 and 4.7.1:
https://issues.civicrm.org/jira/browse/CRM-17953

The issue has a workaround solution, and the full fix will be linked from that issue when it has been implemented.