I have a website.It has got two pages.page1 and page2.
Page1 is the home page.In page1 there is a button.
If the user clicks on the button page2 will get opened.
when the user types the url of page2 on the address bar page2 is getting opened.
I dont want the user to directly go to page2.
whenever user types address of page2 ,he should be redirected to the home page.
Only on clicking the button in page1,the user should go to page2.
format of url is like this
http://myshec774733/myportal/page1 (this is the homepage)
if the user types http://myshec774733/myportal/page2 on the address bar he should be directed to page1.