- Nothing
- -> foundNoEntity Nothing
-
- Just redir@(Redirection _ _ _ _ _)
- -> handleRedirect env redir
-
- Just entity@(Entity _ _ _ _ _ _ _ _ _ _ _ _ _ _ _)
- -> handleGetEntity entity
+ Nothing -> foundNoEntity Nothing
+ Just page -> if isEntity page then
+ handleGetEntity page
+ else
+ handleRedirect env page