implemented redirecting into pages