View Full Version : .htaccess problem
I uploaded it and everything! I mean, when i enter the password, the screen just restarts for lack of a better word and asks for my password and username again. The .htpasswd file is in the directory i specified in the .htaccess file.
This is the contents of the .htaccess file:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /sec/.htpasswd
AuthGroupFile /dev/null
<Files admin.php>
require valid-user
</Files>
The .htpasswd file is in the /sec/ directory which comes right after the one that .htaccess is in. IT DOESN'T WORK. I've read everything. Only thing I can think of is how do i know i uploaded it as ASCII instead of binary. But I read that binary is 0010 0110 1011 . I used plain letters. So I have abosultly no idea....
The file /sec/.htpasswd exists? Remember that this is an absolute path, starting from your filesystem root -- that is, sec is a top-level directory, with nothing but / above it.
Only thing I can think of is how do i know i uploaded it as ASCII instead of binary. But I read that binary is 0010 0110 1011 . I used plain letters.:) All data stored in digital form is stored as binary numbers. The letter "a", for example, is stored as 01100001. In FTP terms, "binary" is used to mean simple upload, with no compensations performed for platform differences. Using ASCII mode will cause your FTP client to convert linebreaks to the correct format for the server's platform: "\r\n" for DOS/Windows, "\n" for *n?x and "\r" for older (pre-Darwin) forms of Mac OS.
The file /sec/.htpasswd exists? Remember that this is an absolute path, starting from your filesystem root -- that is, sec is a top-level directory, with nothing but / above it.:) All data stored in digital form is stored as binary numbers. The letter "a", for example, is stored as 01100001. In FTP terms, "binary" is used to mean simple upload, with no compensations performed for platform differences. Using ASCII mode will cause your FTP client to convert linebreaks to the correct format for the server's platform: "\r\n" for DOS/Windows, "\n" for *n?x and "\r" for older (pre-Darwin) forms of Mac OS.
Yes, the file /sec/.htpasswd exists...
So, what is wrong with my code?
Are you sure? Most hosts don't have a top-level directory called sec. I mean, it's possible; I just doubt it. I suspect you may have meant sec/.htpasswd, which would be a relative path.
Are you sure? Most hosts don't have a top-level directory called sec. I mean, it's possible; I just doubt it. I suspect you may have meant sec/.htpasswd, which would be a relative path.
I made that directory, how do I find out the top level directory?
The top level directory is called /. If you go into your FTP client and run "ls /sec", and it shows you your .htpasswd file, then I bow my head in shame. If not, try removing the slash from the beginning of that path in your .htaccess file.
The top level directory is called /. If you go into your FTP client and run "ls /sec", and it shows you your .htpasswd file, then I bow my head in shame. If not, try removing the slash from the beginning of that path in your .htaccess file.
http://img392.imageshack.us/img392/9465/help1iz.png
As I thought. Remove the slash from the beginning (leaving "sec/.htpasswd").
As I thought. Remove the slash from the beginning (leaving "sec/.htpasswd").
Still doesn't work. I think maybe it has something to do with the Dynamic Drive encrypter because the password changes each time it is encrypted.
http://img117.imageshack.us/img117/1677/help7gq.png (http://imageshack.us)
I enter 2a into the Username field and a2a into the password field. Just doesn't work... :confused: :confused:
I got it to work :D!!!!!
I just had to do this:
AuthUserFile /homepages/23/d130162528/htdocs/subdomains/gfd/Phobia/sec/.htpasswd
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.