Web Hosting Talk







View Full Version : htaccess not working


sdaltrey
07-25-2002, 06:23 AM
Hi,

I am trying to setup password protection on one of my web server directories. I have installed the .htaccess file in the required directory and setup the password file .htpasswd.

The problem is nothing happens when I access the directory from my web server.

I have tried all sorts of settings in the .htaccess file such as password authenication, IP access lists, and redirects, but nothing happens.

Here is a sample .htaccess file I've tried:

AuthType Basic
AuthUserFile /usr/home/steve/.htpasswd
AuthName "Authorised User"
AuthGroupFile /dev/null

<Limit GET>
require user steve
</Limit>

Any help on this would be much apreciated!

thanks

Steve

nvphone
07-25-2002, 05:52 PM
http://www.htmlbasix.com/passwordprotect.shtml

webhappy
07-25-2002, 06:49 PM
Use your control panel.

Even basic panels usu. support pass-protecting directories.

TMX
07-25-2002, 10:04 PM
Originally posted by sdaltrey
I have tried all sorts of settings in the .htaccess file such as password authenication, IP access lists, and redirects, but nothing happens.

None of the directives you've added to your .htaccess have worked at all, period? Strange....

A couple of things come to mind, although I promise nothing. First, if your server is set up for FrontPage, it may be looking for a filename other than .htaccess. Open up your httpd.conf and look for the AccessFileName directive - this is used to specify what filename to look for.

AccessFileName .htaccess

If it's something other than .htaccess, that is the filename you will have to put your commands into.

Look for the AllowOverride directive as well. This allows you to override the default configuration with your own commands.

AllowOverride All

Please note that the "AllowOverride" directive may be found in several spots in the httpd.conf file - you want the one that is NOT between any tags.

Be sure to make a backup of httpd.conf before you start.

More info here (http://gump.covalent.net/manual/mod/core.html)

Hope this helps.

-Bob