| htaccess and GoDaddy.com [message #509] |
Sat, 29 July 2006 19:58  |
Nessnc Messages: 5 Registered: July 2006 |
|
|
|
I am also having a very difficult time getting .htaccess to work on GoDaddy.com. My facts are as follows:
I created a .htaccess file with the following code and placed it in a directory named Members Only. This directory is in the root of my site and within Members Only is the web page I want to protect, MembersOnly.html.
AuthType Basic
AuthName "This area is for NC Blue Knight XIX Members Only."
AuthUserFile /home/content/s/a/n/san.../html
Require valid-user
**san... is actually my full username for godaddy.com. I just didn't list it all here.
I then used a password generator from the following site to create a username and password:
http://www.htaccesstools.com/htpasswd-generator/
This was then copied into the .htpasswd file, which was placed in the root of my site.
When I navigate to the site and click the link in question I do get the password dialog box, but when I put in the username and password created, testing and test123, it recycles right back to the password dialog box. Until the third try which produces the following;
Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
--------------------------------------------------------------------------------
Apache/1.3.33 Server at http://www.ncbkxix.com Port 80
I have been working on this for 2 days now and have tried numerous suggestions without success. Can anyone help me figure this out?
|
|
|
|
| htaccess and GoDaddy.com [message #515] |
Tue, 01 August 2006 02:16   |
Nessnc Messages: 5 Registered: July 2006 |
|
|
|
Ok, thank you so much for your help. The password protion is now working. However, I do have another issue concerning custom error pages.
I have created a custom 401 error page and added some text and an animated gif. The error page loads as needed and the text shows fine, but the gif will not come through. I see the place holder and alt tag for the gif but not the gif itself. I have also replaced the gif with a jpeg and get the same results.
However if I type a path directly to the custom error page using IE it works fine. Below is the code used for the custom error page in htaccess.
ErrorDocument 401 /401.html
Also, the 401.html file is in the root of the site and the gif is in a directory called Images. Am I missing something?
|
|
|
|
| another godaddy htaccess question [message #579] |
Wed, 20 September 2006 06:21   |
domanicapital Messages: 6 Registered: September 2006 |
|
|
|
I've been struggling with a similar problem for DAYS. Please help.
Here is my htaccces file:
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/content/u/t/a/utah../html/.htpasswd
AuthGroupFile /dev/null
<Files member.htm>
require valid-user
</Files>
<Files member_directory.htm>
require valid-user
</Files>
I put it in the root directory that I end up in when I ftp. the directory where the main index file of the home page is located. In that directory are the files i'm referencing above (like member.htm) that I want to protect.
And then I used a password generator (the one you listed) to get an .htpasswd file, and then I put that file in the root directory too.
When I test it out, I go to the home page and then i click on the member.htm link and a password box pops up. BUT this is where the problem is. It won't accept my password.. ever. I've tried a dozen different ones, a dozen different generators. I've tried putting it in a different directory then changing this line to
AuthUserFile /home/content/u/t/a/utah../html/safedir/.htpasswd
I've even tried an .htpasswd with test:test as the user name and password
What am I doing wrong?
Thanks
|
|
|
| htaccess and GoDaddy.com [message #580] |
Wed, 20 September 2006 07:43   |
howard Messages: 7 Registered: September 2006 |
|
|
|
It sounds like your .htpasswd file is not being found or that what is in it is not right.
At Godaddy I found that the ONLY location I could put .htpasswd where it would work was as you had at first with your .htaccess line:
AuthUserFile /home/content/u/t/a/utah../html/.htpasswd
...as Andreas illustrated a few posts up.
Then, when using ftp, you would have to place your .htpasswd file here:
They are both the same location. Godaddy just chroots your ftp client to the:
/home/content/u/t/a/utah../html/
Is that what you have?
|
|
|
| godaddy ht [message #582] |
Thu, 21 September 2006 04:27   |
domanicapital Messages: 6 Registered: September 2006 |
|
|
|
yup, that's what i have. i can't for the life of me figure out why it isn't working. It seems like the hard part is over.. actually getting the password box to pop up. I just don't know why it can't find the password file.
I am using ftp commander and then i just plug in my godaddy username and password and i end up in the root directory (which is what I assume godaddy calls ...username/html/)
I threw in the htaccess and htpassword file there but it doesn't work.
any other thoughts?
and if i can't get this working, is there another easy option because htaccess that I could use to password protect a few selected html files within my root directory? it doesn't matter how secure it is, I just need to have some layer of protection even if it is hackable.
thanks
|
|
|
| htaccess and GoDaddy.com [message #583] |
Thu, 21 September 2006 06:38   |
howard Messages: 7 Registered: September 2006 |
|
|
|
If you're sure that .htpasswd is in the right location then the focus would be on the file itself.
Assuming you're getting your password correctly entered into the file I've seen these two things stated:
- You need to follow the last .htpasswd entry with a return.
Your curser should end up at the beginning of the next line with no spaces.
\n should be the last thing apache sees.
- When transferring with ftp, you should upload the file in ascii mode, not binary.
I have also seen that if the file is created in a msdos text format there could be a problem when used on a linux server.
I uploaded in binary at least once by mistake and when I viewed what was posted on the server, with wsftp, it showed a line that went straight accross with no breaks. I believe that attempt failed to work properly.
I have been using "textpad" editor (nice, btw) and wsftp on win 98 (don't laugh) with no problem. Can't speak for others.
|
|
|
|
| htaccess and GoDaddy.com [message #604] |
Tue, 26 September 2006 04:54   |
howard Messages: 7 Registered: September 2006 |
|
|
|
I think you should get a handle on this rather than sub it out as you will need to make changes in the future. Not to mention that it might not be so wise to allow someone else access to your site.
Scanning back through this, I see no mention has been made about permissions. That could be it, see below.
Also, I'm not sure about that hatccess file posted above. Might be better to start minimal and work up, see below.
If nothing else, drop back and punt. Start from scratch, one more time... with feeling!
In my win98 I did this:
- went here- http://www.htaccesstools.com/
- clicked on the item- .htaccess Authentication
- filled in path info to make basic .htaccess file
- copy/pasted that right into good old notepad,
- saved as htaccess-ntpad (NO DOT) and let notepad put the .txt on it.
- did the same for the htpasswd
- ftp'd htpasswd-ntpad.txt into place at root directory ( / )
- renamed to .htpasswd (with the dot)
- checked the permissions (should be -rw-r--r-- (or 644))
- ftp'd htaccess-ntpad.txt into the directory I want to protect: /test
- renamed to .htaccess and checked permissions for 644
- They worked fine.
Here is the .htaccess file the above generated:
-----
AuthType Basic
AuthName "My Protected Area"
AuthUserFile /home/content/h/o/w/howards/html/.htpasswd
Require valid-user
-----
Note:
- I tried 660 permissions on .htpasswd and got the reappearing login!
I guess Apache goes to it as an "other"
- While I used Notepad , I am still using wsftp for transfer.
- And while I've seen it said that you must use ascii mode for transfer, I used binary all the way through this time and noticed no ill effects.
|
|
|
| motivated again [message #613] |
Thu, 28 September 2006 04:50   |
domanicapital Messages: 6 Registered: September 2006 |
|
|
|
thanks for the encouragement.. I think I'm ready to give it another good try here...
But I'm not sure what you mean by setting the permissions... 660, 644, etc..
Where do I do this???
(I'm using godaddy of course..)
Thanks
|
|
|
| htaccess and GoDaddy.com [message #617] |
Thu, 28 September 2006 08:11   |
howard Messages: 7 Registered: September 2006 |
|
|
|
644 Permissions.... ok in my wsftp if I go to the directory where .htacess is and click "Dir Info" a "notepad" opens up showing the listings. The line for my htaccess listing looks like this:
-rw-r--r-- 1 973 513 130 Sep 25 17:26 .htaccess
Note the file name on the right and the "permissions on the left"
What you see there on the left is what is "644" permissions or -rw-r--r--.
Again in wsftp, (close the notepad window) if I right click on the file a menu appears from which I choose "chmod" (change mode). I adjust the selections to get the desired permissions and click OK. I always "refresh" and check "Dir Info" again to make sure permissions were indeed changed.
google file permissions , chmod , ftp commander
Find out why it needs to be readable by others:) Have fun widdit...
+Howard
|
|
|
|
| ahhhh...a solution? [message #632] |
Fri, 06 October 2006 17:02   |
lowella Messages: 1 Registered: October 2006 |
|
|
|
Hi guys! I've been reading the recent posts on godaddy and had similar frustrations for the past week getting htaccess to work.
WELL....the answer for me was that they were hosting mine on a windows server, not linux! As soon as I realized this and changed my account to a linux server (you can do this through the myaccount prefs or call them) - it worked!!! Had to wait 24 hours for the changeover, but it all works beautifully now. I was going nuts there for a while!!
Hope this helps someone.
|
|
|
| it finally works [message #635] |
Sat, 07 October 2006 07:11   |
domanicapital Messages: 6 Registered: September 2006 |
|
|
|
Thanks to this forum my godaddy htaccess file is now working. I can't believe I spent hours trying to figure it out and it turned out to be a silly mistake but an important lesson----
Here was my old htaccess file that didn't work
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/content/f/l/o/florida../html/.htpasswd
AuthGroupFile /dev/null
<Files member.htm>
require valid-user
</Files>
<Files member_directory.htm>
require valid-user
</Files>
And here is the new one that works
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/content/F/l/o/Florida../html/.htpasswd
AuthGroupFile /dev/null
<Files member.htm>
require valid-user
</Files>
<Files member_directory.htm>
require valid-user
</Files>
see the difference??????????
I should have known that it was case sensitive!
Thanks for all your help.
|
|
|