Home › Forums › Archives › Computer Support › Computer Support Discussion › .htaccess help
- This topic has 7 replies, 4 voices, and was last updated 19 years, 6 months ago by camster.
-
AuthorPosts
-
November 5, 2004 at 12:16 am #14550camsterMember
all right, I’m trying to password protect my site. I would like to use .htaccess. I have tried all of the tutorials, and I can get the password box to oped up in the right places, but when I enter a password, the box just pops back up again. But here is my .htaccess file. I have it in the folder “movies” on my cox web server.
AuthUserFile movies/.htpasswd
AuthGroupFile /movies/
AuthName “Camster Movies Password”
AuthType Basicrequire valid-user I also have a .htpasswd file, which looks something like this. (Note that this in not the real username and password i’m using, this is with a username “BBB” and a password “Dude”. This file, and .htaccess is in http://members.cox.net/flashmovies/movies
BBB:009Grh1QFCkF2
any ideas?
November 5, 2004 at 5:30 am #103924bronxyMemberWhat are you asking?
For some of my password protected directory’s, my .htaacess is the following:
AuthType Basic
AuthName “Restricted Area”
AuthUserFile “/home/userid/.htpasswds/rootdirectory/passwd”
require valid-user
November 5, 2004 at 6:28 am #103925camsterMemberQuote:quote:Originally posted by bronxyWhat are you asking?
For some of my password protected directory’s, my .htaacess is the following:
AuthType Basic
AuthName “Restricted Area”
AuthUserFile “/home/userid/.htpasswds/rootdirectory/passwd”
require valid-user
I’m saying it doesn’t work:
Quote:quote:Originally posted by camsterbut when I enter a password, the box just pops back up again
November 5, 2004 at 7:14 am #103922DJHyperbyteMemberIf it rejects your password, it most likely means it can’t read your authfile. Reasons for this could be that the authfile is invalid or maybe you have to use the full path to the file (which you could’ve known if you looked at the config bronxy posted).
November 5, 2004 at 3:35 pm #103926camsterMemberwell, I use this password generator: http://www.euronet.nl/~arnow/htpasswd/ and then I copy and paste the result in notepad and name it .htpasswd
in the AuthUserFile space I’ve tried putting
/movies/.htpasswd
/.htpasswd
and /flashmovies/movies/.htpasswd
none work. I’m almost positive that its either the .passwd file or the AuthUserFile section on .htaccess, because everything goes ok until I try to enter the password.EDIT: i’d also like to point out that if I put “require valid-user” at the bottom, the password box doesn’t even come up. I have to put “require user BBB”
November 5, 2004 at 7:19 pm #103923DJHyperbyteMemberThe reason why it doesn’t pop up then is because there are no valid users, since it didn’t read your .htpasswd file. Like I said before, use the full path to your .htpasswd file. Either contact your host about that, or execute this PHP script (if your host supports that) to get the full path:
[/CODE]Do note that this code needs to be execute in the same dir as your .htpasswd file.[CODE]<?php
echo realpath(‘.htpasswd’);
?>[/CODE]Do note that this code needs to be execute in the same dir as your .htpasswd file.November 5, 2004 at 7:22 pm #103921SathallrinMemberMaybe this?
AuthType Basic
AuthName “Camster Movies Password”
AuthUserFile “/home/flashmovies/movies/.htpasswd”require valid-user
could be slightly different depending how the user directory is setup.. I’m not sure how cox.net file server is setup.
November 5, 2004 at 7:26 pm #103927camsterMemberQuote:quote:Originally posted by DJHyperbyteThe reason why it doesn’t pop up then is because there are no valid users, since it didn’t read your .htpasswd file. Like I said before, use the full path to your .htpasswd file. Either contact your host about that, or execute this PHP script (if your host supports that) to get the full path:
[/CODE]Do note that this code needs to be execute in the same dir as your .htpasswd file.
[/quote]
I’m really new at this, so I’m not sure what you mean by some of this. By full path to your .htpasswd file, do you mean puttingAuthUserFile http://members.cox.net/flashmovies/movies/.htpasswd
instead of
AuthUserFile /.htpasswd
? because I already did that, although thats probablly not what you meant, again, I dont know anything about this except for what I’ve posted and learned about .htaccess in less than 30min.quote:[CODE][/CODE]
and I have no idea what to do with that. Maybe I should use some different password protection method. Thanks for all of your help, tho. I don’t want you spending a lot of your time trying to teach me this stuff i’ll never get.
[CODE]<?php
echo realpath(‘.htpasswd’);
?>[/CODE]Do note that this code needs to be execute in the same dir as your .htpasswd file.I’m really new at this, so I’m not sure what you mean by some of this. By full path to your .htpasswd file, do you mean putting
AuthUserFile http://members.cox.net/flashmovies/movies/.htpasswd
instead of
AuthUserFile /.htpasswd
? because I already did that, although thats probablly not what you meant, again, I dont know anything about this except for what I’ve posted and learned about .htaccess in less than 30min.Quote:quote:[/CODE][/quote]
and I have no idea what to do with that. Maybe I should use some different password protection method. Thanks for all of your help, tho. I don’t want you spending a lot of your time trying to teach me this stuff i’ll never get.[CODE]<?php
echo realpath(‘.htpasswd’);
?>[/CODE]and I have no idea what to do with that. Maybe I should use some different password protection method. Thanks for all of your help, tho. I don’t want you spending a lot of your time trying to teach me this stuff i’ll never get.
-
AuthorPosts
- You must be logged in to reply to this topic.