Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

.htaccess problem

I have tried to set htaccess password with my web server for my pages
I created a file .htaccess and a password file .htpasswd and plavced them in a directory. when I log in with Cute FTp the path I see inside is /public_html and nothing else so I placed the above path in the htaccess file but when I go to my page it asks me my id and password and it keeps asking me as if it's the wrong password. I think somehow the directory I placed inside the htaccess is wrong
to get tou my page is www.users.globalnet.co.uk/~markv/lepage and it asks me for a password but to no evail. wich is my path to tell the htaccess file ??
Help please
0
souvlaki
Asked:
souvlaki
1 Solution
 
julio011597Commented:
I guess you should put in it a path relative to your web server root directory.

-julio
0
 
souvlakiAuthor Commented:
yes but what is the path ??

I have tried puting the path I see when I log on with FTP but nothing
0
 
julio011597Commented:
Since you're talking about htaccess, i guess your pages are reachable through a web server, and the said path is what you would see in the location field of your browser, after the host.domain part.

E.g., this page's url is "http://www.experts-exchange.com/topics/bin/ShowQ?qid=8630035321", so the path is "/topics/bin/ShowQ?qid=8630035321".

HTH, julio
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
souvlakiAuthor Commented:
wlll I have tried that but nothing
0
 
julio011597Commented:
Can you the pages if you remove authentication?
0
 
julio011597Commented:
Sorry: can you _get_ the pages if...?
0
 
souvlakiAuthor Commented:
Yes
0
 
julio011597Commented:
So, it seems your access and password files must be wrong.

Could you show them?
0
 
souvlakiAuthor Commented:
this is the htaccess file

AuthUserFile /~markv/public_html/lepage/.htpasswd

AuthGroupFile /dev/null

AuthName ByPassword

AuthType Basic



<Limit GET>

require valid-user

</Limit>




0
 
julio011597Commented:
There seems to be no error here.
0
 
souvlakiAuthor Commented:
yes but I don't think the path for the htpasswd file is right cause it wont find it I dont know the path
0
 
julio011597Commented:
Sorry, i'm lost, since i've no access to the rilevant documentation anymore.
0
 
ozoCommented:
Does your server recognise ~user notation in path names?
That's usually a shell globbing feature.
0
 
souvlakiAuthor Commented:
Yes the path to my page is www.users.globalnet.co.uk/~markv

but when I get in my filder where the pages are stored lets say the index htm. I go to Cute FTP and connect to www.users.globalnet.co.uk and the directory is /public_html/
0
 
bigelosCommented:
Your root directory for FTP is usually your unix shell account directory.  However, if your ISP is anything like all the others I've seen, you have a public_html directory that is used as the root directory for your web site, and nothing can be accessed above it.  Instead of using the absolute path, why don't you just use the relative path? i.e. put the .htpasswd file in the same directory as the .htaccess file, and then the path would be just .htpasswd.

There is a full guide to HTTPd available here:
http://hoohoo.ncsa.uiuc.edu/docs/tutorials/user.html
0
 
souvlakiAuthor Commented:
Well I have tried everything even the .htpasswd path on its own but it can't find the path

my server has /public_html and you can't go above it
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now