Guest Raven Posted May 29, 2006 Share Posted May 29, 2006 hi.programming a homepage and have encountered a problem i cannot solve and tried searching for a solution but with no success.i have one mainpage and around 20 subpages and it all works good and as i want it too.the problem is i want to force people to access the subpages from the mainpage only and not from outside links.if anyone tries to access a subpage i want them preferbly to be redirected to the mainpage.is it possible to do it through html or javascript ?what is it called and what words can i use to search for a solution ?anyone sitting on a link to a solution ?asp cgi jsp php or similar wont do as those codes aint supported.RegardsRaven Link to comment Share on other sites More sharing options...
scott100 Posted May 29, 2006 Share Posted May 29, 2006 the problem is i want to force people to access the subpages from the mainpage only and not from outside links.if anyone tries to access a subpage i want them preferbly to be redirected to the mainpage.<{POST_SNAPBACK}> You could test to see if the document.referrer was the main page, if it is show the sub page, if not show the main page.This might help you out.http://w3schools.invisionzone.com/index.ph...311&hl=referrer Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now