?
Solved

.htaccess problem

Posted on 1998-01-28
16
Medium Priority
?
279 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 150 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 

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
 

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial will discuss fancy secure registration forms, with AJAX technology support. In this article I assume you already know HTML and some JS. I will write the code using WhizBase Server Pages, so you need to know some basics in WBSP (you mig…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

650 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