...

View Full Version : securing html pages



manishkusan
10-07-2004, 04:38 PM
Dear friends

i have got some html pages and i want to secure that pages without using any server side scripting language.

plz help me.

thanks in advance.

gohankid77
10-07-2004, 04:43 PM
Impossible.

Nightfire
10-07-2004, 04:47 PM
What do you mean by securing?

manishkusan
10-07-2004, 06:55 PM
I mean to say that only authorized users can view those pages.
bye.

gsnedders
10-07-2004, 08:03 PM
Here's a Javascript login script... Of course it's not as secure as a server side one though...

http://www.codingforums.com/showthread.php?t=10114

mrjamin
10-08-2004, 03:35 PM
if you're hosting on an apache equipped server, the .htaccess method is easy.



AuthName "Name for your protected area"
AuthUserFile /absolute/path/to/passwords/file/.htpasswd
AuthType Basic
require valid-user


stick that in an htaccess file

then visit http://www.euronet.nl/~arnow/htpasswd/ to generate username/passwords pairs, which you should then put in an .htpasswd file, one pair per line. It'll look something like this:



username:66yGQHg8KA7jw
administrator:saiuygfa76gw


replace the AuthUserFile with the path to the htpasswd file you just created.

Using this method will protect a whole directory, but I'm sure someone will come along and help you adapt the code to protect individual files/

tsguitar2004
10-09-2004, 01:25 AM
Check out this thread:
http://www.codingforums.com/showthread.php?t=42785
That's a pretty nice and quick way to do this. And it's better (more secure) than a JS method. I keep that in the back of my mind as I'm thinking of creating space for my students to log on to my site and store papers. That quick PHP is easy to manage and easy to create.
-ts

gsnedders
10-09-2004, 11:22 AM
He said he didn't have any server-side language...

tsguitar2004
10-10-2004, 04:53 AM
<shamed and embarrassed>
Oops. Well, then... Uh... yeah.
-ts



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum