cancel
Showing results for 
Search instead for 
Did you mean: 

Can't get.htaccess to work on cgi server

N/A

Can't get.htaccess to work on cgi server

Hi folks,

Sorry if this is flogging a bit of a dead horse, but I'm looking to set up an osCommerce site and need to be able to protect some of my sub directories. I seem to have got stuff loaded to the cgi server ok (possibly more by luck than judgement) but I'm having real trouble getting the .htaccess to work. I get the dialogue box but when I enter the password I get a repeat of the box with a 401 message. I have tried various combinations of password, encrypted and plain, different paths; nothing seems to work. I've worked throught the .htaccess guide on the FAQs and have trawled this forum for more ideas - all with no success.
The text I've got is:

AuthUserFile /catalog/admin/.htpasswd
AuthName "Please Log On Using Your Username and Password"
AuthType Basic
require valid-user

Any suggestions as to what I could do next? Does this look like a sensible path?

All suggestions gratefully received!

Rich
2 REPLIES
N/A

Can't get.htaccess to work on cgi server

The path for AuthUserFile should be /files/homex/rmpeters/catalog/admin/.htpasswd

Where x is either missing, 1, 2, 3 (or maybe 4) depending on your home directory location.
N/A

Can't get.htaccess to work on cgi server

Colin,

Thanks very much for that. I know that when I ran a 'pwd' command, all I got was the catalog/admin path. I did read something about the homex directory earlier on in my search for info - I' d obviously forgotten.

However, when I look with my FTP programme, I appear to have uploaded into the root directory, not into the /home/etc one. However, I'm pretty sure that I did it right in the original upload. Don't know what's happened there.

I'll give it another go and report back. (Learing how to use the -a server side filtering to be able to see the .htaccess file was a useful thing!)

Regards,

Richard