Re: [users@httpd] Verifying Apapche httpd.conf and other files one piece at a time as requested/

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 9/6/06, Leon Sargent <leonsargent@xxxxxxxxxxx> wrote:
This is the first part of my httpd.conf file.

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory />
     Options FollowSymLinks
     AllowOverride None
</Directory>

Will this code override this code in my .htaccess file?

AllowOverride AuthConfig
AuthUserFile lhsmarkets.com/Library/WebServer/Documents/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
Options +FollowSymLinks
RewriteEngine On
RewriteBase /Documents/
RewriteRule ^(.*)-p-(.*).html$ product_info.php?products_id=$2&%
{QUERY_STRING}
RewriteRule ^(.*)-c-(.*).html$ index.php?cPath=$2&%{QUERY_STRING}
RewriteRule ^(.*)-m-(.*).html$ index.php?manufacturers_id=$2&%
{QUERY_STRING}

I don't really know what you mean by "override this code".  Setting
AllowOverride to None will indeed turn off processing of .htaccess
files.  But you likely have another AllowOverride directive in a
different part of httpd.conf that turns AllowOverride back on for
certain parts of the filesystem.  So assuming that the directory
containing the .htaccess is covered by an AllowOverride all, then the
.htaccess will be read.

Two other things:
1. You can't put AllowOverride inside an .htaccess.  It makes no sense
to control .htaccess reading from inside an .htaccess file.

2. You should probably just avoid .htaccess entirely.  As the
.htaccess tutorial explains, anything that can be done inside
.htaccess can also be done in a <Directory> section in httpd.conf.  So
just use httpd.conf and everything is simpler (no need to bother with
AllowOverride) and faster (the .htaccess files don't need to be read
on every request).

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux