Redirecting Multisite sites to the main site

I have a multisite installation that I have network enabled a plugin that sets every site to display a basic "Coming Soon" page.

However, what I would really like to do is redirect from all the sites to the main site, and create a cookie that stores the site before it was redirected.

For example, if a user goes to:
http://somedomain.com/testsite1
Then, what I would like to do is to create a cookie that has value:
site=testsite1
and then redirect to:
http://somedomain.com
where the "Coming Soon" page will be displayed.

Any help is welcomed!

Thanks in advance.