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 sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

secure html file

Status
Not open for further replies.

maswien

Technical User
Sep 24, 2003
1,286
CA

Is there any possiblity that set the HTML file can only be accessed from a particular page?

I don't want using ASP code or javascript to achieve that.

Thanks
 
You could place the HTML file in a separate directory and set permissions on the server (if you the access rights to do so) to only those users authorised to see it. This would provide a username/password protection on that file and any others contained within the directory.

HTH

----------------------------
SnaveBelac - Adventurer
 

But these html files need to be accessed by some particular pages, I mean the users that can view a particular page then he automatically get the permission to view this html file, otherwise not.

Hope I clarify a bit.
 
You will (almost certainly) need some sort of server-side script to do this.

You could check the referrer - but some users have this turned off.

One of the most accurate ways to do this would be through session management. User hits page 1 - session starts. User hits page 2 - if no session is available, no access is given.

<marc> i wonder what will happen if i press this...[ul][li]please tell us if our suggestion has helped[/li][li]need some help? faq581-3339[/li][/ul]
 
mjia,

If your website is on a Apache server (>50% likely) then you can make a folder that requires users to login. It only require that you put two files on the server.

The buzzword is ".htaccess". Google it or have a look in the Apache Web Server Forum : forum65

Good Luck


Jakob c",)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top