Re: Please help with htaccess

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
On Sun, 22 May 2005 20:25:02 +0000, Leslie E. Zeigler wrote:

Quoted text here. Click to load it


Seams like a stupid question, but did you turn on the line in your
httpd.conf which tells the system to look at .htaccess files & set your
allow override in the <directory></directory> option as well. I noticed
that in most default installations of apache under various distros,
these are both turned off.

For example, I use .htaccess files, so I have setup this:

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all

And I turned on this:

AccessFileName .htaccess
<Files ~ "^\.ht">
    Order allow,deny
    Deny from all

Ok here is what this whole mess means:

The `AllowOverride All` line in the <Directory></Directory> section allows
.htaccess file's contents to override/augment the default settings for
that folder given in <Directory> & all of its sub-folders.

The `AccessFileName .htaccess` line states for apache to look at files
called .htaccess to figure out what all the password stuff is & what
settings to override, if necessary.

Lastly, the <Files></Files> section prevents someone from reading the
.htaccess files from their web browser, after once login to that
section of your site, if they try to access it directly in a URL.

If you use these 3 settings it should allow .htaccess files to correctly
process.  This of course assumes you have the correct settings in your
.htaccess files to begin with.

I hope this helps...

Re: Please help with htaccess

You saved the day!!

It worked!
Thanks ever so much!


Quoted text here. Click to load it

Site Timeline