redirect to url if not logged in

I'd like to redirect visitors to a static html file if they try to access the root installation while not logged in. any ideas on how I could do this?