Accessing only the "index" page.

  • Thread starter Thread starter darkrats
  • Start date Start date
D

darkrats

I have a website consisting of an index page with several links to other
pages, all located on the same server in the same directory.

Is there any way to keep people from accessing the other pages directly?
I want them to have to go throught the index page.

Thanks.
 
darkrats said:
I have a website consisting of an index page with several links to
other pages, all located on the same server in the same directory.

Is there any way to keep people from accessing the other pages
directly?
I want them to have to go throught the index page.

Put it all in line on 1 page with in line links. Otherwise, forget it.

Tom J
 
dakrats,
You could try this.

On every page other than index.html
<body onload="detect()">

Then put this JS into external.js
function detect()
{
if (parent.location.href == window.location.href)
parent.location.href = "index.html"
}

In the <head> section of each page, add
<script type="text/javascript" src="scripts/external.js"></script>

It works for me.

(Note: If your index is index.htm, change where relevant)
 
Thanks for the suggestion.
I'll give it a try when I get some time to work on my site.
Much appreciated!
 
That script only works for frames
- it detects if the parent window (frameset) is the current window
--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
To find the best Newsgroup for FrontPage support see:
http://www.frontpagemvps.com/FrontPageNewsGroups/tabid/53/Default.aspx
_____________________________________________


| dakrats,
| You could try this.
|
| On every page other than index.html
| <body onload="detect()">
|
| Then put this JS into external.js
| function detect()
| {
| if (parent.location.href == window.location.href)
| parent.location.href = "index.html"
| }
|
| In the <head> section of each page, add
| <script type="text/javascript" src="scripts/external.js"></script>
|
| It works for me.
|
| (Note: If your index is index.htm, change where relevant)
| --
| Cheers,
| Trevor L.
| Website: http://tandcl.homemail.com.au
|
| Tom J wrote:
| > | >> I have a website consisting of an index page with several links to
| >> other pages, all located on the same server in the same directory.
| >>
| >> Is there any way to keep people from accessing the other pages
| >> directly?
| >> I want them to have to go throught the index page.
| >
| > Put it all in line on 1 page with in line links. Otherwise, forget it.
| >
| > Tom J
|
|
 
Back
Top