Redirect All Users Except Admins in WordPress

Useful code snippet if you are designing a website.

<?php 
if (current_user_can( 'manage_options' )) {
     // enjoy
} else {
     header('Location: http://domain.com/coming-soon.html');
	 exit();
}
?>

Source