Page 1 of 1

".htaccess"

Posted: Wed Feb 04, 2004 9:29 am
by Labbat
Hello,
Recently I was playing with a free server, and it was quite simple to set up the ".htaccess" File..
Alls, I had to do is make the script, then make the ".htpasswd" File, and it worked...
Now, Im not going to use a free server for a number of reasons, Such as: Ill be buying my own server soon here, I just had a few unexpect expenses with my family here...
Secondily, they decorate your site with a bunch of their adds
(I guess thats how they get advertising)
Thirdly, most free hosts dont support PHP...

Anyways, right to the point:
I tried putting my ".htaccess" File, and my ".htpasswd" File on my personal Apache Server.....However, it didn't work...So I started reading tutorials on google.ca about getting it to work, but the furthest Ive got was "You have to tell apache to turn the .htaccess feature on " Then it went on to explain a few things I didn't really understand beneath that...(2 paragraphs)
Why does the Programmers/makers of Apache have to make everything such a pain in the *** hehe....Alright,

my question is, could some-one tell me kinda a step by step explaination of how to get my ".htaccess" File to work?
I understand I have to turn it on in one of the Config Files for Apache? I believe, but beyond that, Im not too sure, where or how .... Thanks

Posted: Wed Feb 04, 2004 10:17 am
by ol4pr0
Well it got something to do with youre httpd.conf.


Loook this up in youre conf.
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All ( <----------- and make it AllowOverride All )

:-)

Re: ' .htaccess '

Posted: Wed Feb 04, 2004 11:01 am
by Labbat
Hey, ok, Im looking for something that matches what you posted....
Ill show you what I found:

# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride All

I changed it to AllowOverride All
At the bottom there...

But I dont know if thats the right spot - to change it?
- Let me know

Thanks

Posted: Wed Feb 04, 2004 11:13 am
by Illusionist
Yes, there is only 1 AllowOverride in the ini file

Got htaccess to work, now htpasswd

Posted: Wed Feb 04, 2004 11:57 am
by Labbat
Hey guys, I got my
' .htaccess ' to work....
http://142.59.59.29/www/admin/
However, this is what my htpasswd file looks like

admin:wLhGEkTk9tqkA

Now thats not my password....I used this thing I found off a website it said "Ecrypt Your Files here" Or something like that
so it said, enter your user name and pass word, so I entered
admin and k7YuHeFv

And it encrypted it too
admin:wLhGEkTk9tqkA

So it said to use that for my htpasswd file, so I did

Now I go to my URL, and enter that as my Password, and it doesn't let me login, because , I assume its thinking wrong password.... So should I just changed the encrypted B.s.
Too the password I want, or how does this work?

Posted: Thu Feb 05, 2004 12:36 pm
by ol4pr0
.htaccess always asks for a full path to the .passwd ;-)

So in youre case that might be.. on a local host.


/root/dir/of/website/ ( no c:\ .. or whatever.

something like

www/bin/.passwd ;-)

on a remote hosted site..

/start point when yo login with a ftp client /to /path/of /.passwd ;-)