Solved

.htaccess problem

Posted on 1998-01-28
16
242 Views
Last Modified: 2013-12-25
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
Comment
Question by:souvlaki
16 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1831868
I guess you should put in it a path relative to your web server root directory.

-julio
0
 

Author Comment

by:souvlaki
ID: 1831869
yes but what is the path ??

I have tried puting the path I see when I log on with FTP but nothing
0
 
LVL 5

Accepted Solution

by:
julio011597 earned 50 total points
ID: 1831870
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
 

Author Comment

by:souvlaki
ID: 1831871
wlll I have tried that but nothing
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831872
Can you the pages if you remove authentication?
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831873
Sorry: can you _get_ the pages if...?
0
 

Author Comment

by:souvlaki
ID: 1831874
Yes
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1831875
So, it seems your access and password files must be wrong.

Could you show them?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:souvlaki
ID: 1831876
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
 
LVL 5

Expert Comment

by:julio011597
ID: 1831877
There seems to be no error here.
0
 

Author Comment

by:souvlaki
ID: 1831878
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
 
LVL 5

Expert Comment

by:julio011597
ID: 1831879
Sorry, i'm lost, since i've no access to the rilevant documentation anymore.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1831880
Does your server recognise ~user notation in path names?
That's usually a shell globbing feature.
0
 

Author Comment

by:souvlaki
ID: 1831881
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
 
LVL 3

Expert Comment

by:bigelos
ID: 1831882
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
 

Author Comment

by:souvlaki
ID: 1831883
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
The viewer will learn how to count occurrences of each item in an array.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now