Forum Moderators: coopster

Message Too Old, No Replies

Keep web pages password protected

Any help would be great

         

joe1182

2:40 pm on Nov 25, 2004 (gmt 0)

10+ Year Member



Does anyone know how to keep certain pages within a website password protected? So that even if someone typed in the URL it would require a username password in order to be viewed? Any help would be great.

tomda

2:49 pm on Nov 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could either :

- a login/register (like any membership system) using server-side script (PHP/ASP/PERL). Then you can display two content depending if you have logged or not.

- type the following in your .htaccess file (if you do not what it is, than do some search in this forum or google)

Just an example
# WEB CONFIGURATION
PerlSetVar AuthFile path/to/password.txt
AuthName "Acces Restreint"
AuthType Basic
require valid-user myname