added redirection handling for pages