Please help a dumb n00b. need a password page.

Soldato
Joined
25 Oct 2002
Posts
4,198
Location
Derbyshire
Could some kind person please build me a blank web page that asks for a password then redirects to another.

It don't need to be secure just stop joe n00b (or me) seeing the next page.

It's for my dive club website and we need to store some club files (mainly forms) and stop anyone sending them back filled in with any old crap.

I've tried various walkthroughs and downloaded ones and healy haven't got a clue, the whole site so far is drag and drop frontpage :(


Email in trust if needed.
 
Depending on the server, you could use .htaccess protection on a directory, and keep the files you want protected in there.

It's easy to set up and very secure too.

Jon
 
Thats just what i need!

But where do i find these files?

Where is the .htaccess kept? Is it something in need to make?
 
Yup. It's just a text file really, but called ".htaccess".

Windows tends to throw a wobbly at creating a file that has no filename, just an extension. So call it htaccess.txt, upload it, and then rename it on the server.

It goes in the directory you want to protect.

Jon
 
Last edited:
I've made both files (save as in *.* in notepad)

My webspace seems to be in 3 sections, fp.something for Front page stuff, ftp for normal space (ftp.plus.net ) and mySQL which makes no sence.

which should be using?
 
I'm getting no where with this :(

I've made a folder called psswd_clubfiles and made both file needed.


.htaccess

Code:
AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile /clubfiles/.htpasswd 
AuthGroupFile /dev/null 
require valid-user

And

.htpsswd

Code:
Chesterfield:g/AWzAKyf0LeM

Should any web pages i put in that folder require a password? Or have like normal got the wrong end of the sitck?
 
Last edited:
Some servers are a bit temperamental about relative paths to htpasswd. Try putting it in the same directory as .htaccess, and modifying .htaccess to suit.

That might not be the problem, but it's worth a shot.

Jon
 
GeForce said:
Some servers are a bit temperamental about relative paths to htpasswd. Try putting it in the same directory as .htaccess, and modifying .htaccess to suit.

That might not be the problem, but it's worth a shot.

Jon
All files are in the same folder :(

Is that what you ment?

link added above

user admin

password admin1
 
In .htaccess you have the line

Code:
AuthUserFile /clubfiles/.htpasswd

So it's looking for the .htpasswd file inside the subdirectory called clubfiles. So put .htpasswd in the same directory as .htaccess, and change that line to

Code:
AuthUserFile .htpasswd
or
Code:
AuthUserFile /.htpasswd
(depending on which one your server likes - try both ;))

Jon
 
tried both

Code:
AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile .htpsswd 
AuthGroupFile /dev/null 
require valid-user

and with /

still the same :(
 
sorted it!

AuthUserFile /share/isp/plusnet/www/th/theblue/htdocs/psswd_clubfiles/.htpasswd
AuthGroupFile /dev/null
AuthName EnterPassword
AuthType Basic

require valid-user
 
Good stuff!

My next suggestion was going to be to try the full path to the htpasswd file, but you got there first :D

Anyway, glad it's sorted mate.
 
Back
Top Bottom