Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

yet, another .htaccess problem.

Status
Not open for further replies.

Cadwalader

IS-IT--Management
Feb 12, 2002
297
US
Hello again..

I am trying to password protect just one page. half of yesterday and all this morning, I have have been fumbling around in this forum and the Internet abroad trying to get it to work. No luck. I can just go right to the page. No internal server errors, nothing.

Here is what htaccess looks like and it is in the directory where the page is that I want to protect:

AuthUserFile /laws/.htpasswd
AuthType Basic
AuthName "Member Page"
AuthGroupFile /dev/null
<LIMIT GET POST>
require valid-user
</LIMIT>

The .htpasswd file is in the dir /laws/. I don't have access to the httpd.conf file, this is on a farmed-out server.

This page only needs one user name and one password. It's not a super high security thing (in fact, I am not sure why the boss wants it protected, it's just a chart showing stuff about licence requirements for phamacies and assisted living facilities...).

And what should the .htpasswd file look like? Just for one username and one password? Hope I was of some help...
--OR--
Thanks for the help...
--Rich

 
You reference htaccess, but I assume you mean .htaccess?

.htpasswd in unencrypted format is simply a text file with the content

username:password

It can be encrypted for greater security.

Recheck the path to your directory in the .htaccess file. For Windows, it's usually in double-quotes:

AuthUserFile &quot;C:/web/htdocs/domain/protect.htpasswd&quot;

For unix, it's usually something like:
AuthUserFile /home/domain/
Other than that, I think you're OK. It would be good to look at the httpd.conf, but it's usually set up with the defaults that match what you're doing, and host companies normally get it right with this feature in my experience. Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
After fiddling with it for like 4 hours Friday night, I found that httpd.conf is not set up for that. So I have to track the boss down, find out the phone # to the hosting company, and make a phone call ;-).

Thanks for the help... Hope I was of some help...
--OR--
Thanks for the help...
--Rich

 
Hi,
did you solve it?
Are you trying to protect a directory or just an individual page?

For just a page you could try something like:

<Files filename>
order deny,allow
deny from all
allow from whatever.co.uk
</Files>


::
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top