Even Simpler: header('Location: http://www.example.com/'.$type.'-page.php'); That way... if you ADD user types... you merely add a page file for the user type. e.g. if user type is 'admin' you'd have to create or insure that an 'admin-page.php' file exists at the location you are redirecting to.