Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

access to files/folders only from index.html

Status
Not open for further replies.

atsea

Technical User
Feb 27, 2005
51
JP
Basically my site has 2 pages (that the user should be able to view:

index.html and content.php

content.php should NOT be accessable unless it has been accessed though index.html (i.e. I don't want to be able to access content.php, or any other .php file, through the URL)

with that said, index.html and content.php use a lot of .php scripts so if I "deny all" nothing seems to work at all.

Could anyone help with the syntax (preferably .htaccess) to accomplish this.

Currently my .htaccess file has: (in the php folder)
Code:
#deny all access
deny from all

#Hide file index
IndexIgnore *.php

however it doesn't work unless I put it directly in the .confg file.

thanks

atsea
 
Hi

atsea said:
content.php should NOT be accessable unless it has been accessed though index.html
Do you mean "accessed th[red]r[/red]ough index.html" ?

Anyway, I should detail this abit more.
[ul]
[li]Visitor must request index.html first, only then can request content.php.[/li]
[li]content.php is included in index.html as [tt]iframe[/tt] and must not appear alone.[/li]
[li]... something else ...[/li]
[/ul]
But any of those can not be achieved only by configuring your web server.

Feherke.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top