fixed wrong url redirection for pages.
Made get API for pages.